-
-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update webgldrawer.js #2620
Update webgldrawer.js #2620
Conversation
Fixed a bug that caused a completely white image to be rendered when two-pass rendering mode was requested (required when multiple images, using transparency, or in debug mode).
Thanks for fixing this, looks reasonable to me. Interestingly, even without this change two-pass rendering is working fine in the demo page, I guess because |
Yes, in my test the second image has an offset of few pixels (and also a rotation). I noticed however that there is a flickering during the enlargement/reduction with white squares (or only the bottom layer and the next in deferred) even when the tiles were previously loaded. This does not occur with a single image. |
When running
And the change you've made here fixes all of those issuse (flickering and white squares), correct? Since I can't seem to reproduce what you're describing I can't test it myself. |
I see you are using Firefox and I was using Chrome. I can reproduce the "white screen" error you were seeing when I also use Firefox. And I can confirm your change fixes the problem :). Even in Firefox I do not see any flickering. I'm on mac OSX 13.3; I'm not sure if the fact that you are on OSX 10.15 would explain this or not.
You are correct, the leaves image is not tiled. You can turn on the Duomo image for a second tiled image. |
Oh, Chrome was not afflicted by the "white screen" bug! This is the flickering effect, on Chrome 131.0.6778.86, macOS 15.1.1, M4 pro processor: test.mp4There are two overlapped images (a lighter image at the bottom, one with more saturated colors above), the above image have an opacity of 0.5. |
Thanks for the video, it helps to see what is going on. Does this only happen when there are multiple image and opacity < 1? Or does opacity not matter? What is the cache size set at for your viewer? I wonder if adding extra images means you're running out of cache space and the textures of the lower-resolution tiles are getting unloaded once you've zoomed in a lot, and then are missing when zooming back out. |
With the opacity set to 1 the flickering is still present but less noticeable. How can I know/change the cache size? |
Does it flicker with
It is the |
Flickering also with canvas drawer. This is probably not the right topic to ask, but is it possible to add a personal post-production shader to the webgl drawer (for example to apply a kernel function)? I've currently modified the original drawer code to do so, but it doesn't seem like an elegant solution. Thanks! |
Great! I think in that case, this PR fixes the bug you found. @iangilman I think this can be merged. If you're loading multiple images like this, setting the
There is no official way to do this yet. I've wanted to add such a feature for some time, and I am planning to work on it in the coming months, but if you have a good idea of how an API for such a thing should be structured, you're welcome to make a PR to get the process started! |
Thanks again, if I can develop an elegant solution I will propose it to you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you both for working through this!
Fixed a bug that caused a completely white image to be rendered when two-pass rendering mode was requested (required when multiple images, using transparency, or in debug mode).