-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Fix for #15296 bug #16382
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
Fix for #15296 bug #16382
Conversation
|
This also fixes a previously unnoticed bug. With just one layer the opacity was applied twice, so when specified opacity was 0.5 the result was 0.25. Additional rendering tests based on https://github.com/openlayers/openlayers/tree/main/test/rendering/cases/webgl-vector would be useful. |
|
📦 Preview the website for this branch here: https://deploy-preview-16382--ol-site.netlify.app/. |
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! This was indeed an overlook, the layer opacity is applied at the end during the final post processing pass.
Could you please update the "webgl-multiple-layers" example to use a VectorLayer instead of PointsLayer? with this fix the output should be similar.
|
Ok, I've updated the test to use the VectorLayer. One thing to note here: I don't see a dedicated WebGL VectorLayer (there's WebGLPoints and WebGLTile, but no WebGLVector) . The only way to get WebGL rendered VectorLayer I know of, is to extend the VectorLayer and override createRenderer to create and return WebGLVectorLayerRenderer instance (or a class extending it) - is in webgl-vector test for example. |
|
#16394 recently added WebGLVectorLayer, so the test can be updated if you rebase. |
|
Ah, ok. I didn't see it then. That explains it. |
61c9ccd to
3ede993
Compare
Fix for openlayers#15296 - the canvas opacity change changes the opacity for all WebGL rendered layers instead only the current one. Removing the 4 lines that do that doesn't seem to break anything and it fixes the issue.
3ede993 to
e4b8388
Compare
|
Ok, I've updated it and the webgl-multiple-layers test passes with the WebGLVector. |
|
Looks like the lint step is failing, could you please try and fix it? thanks |
jahow
left a comment
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 for the fix!
Fix for #15296 - the canvas opacity change changes the opacity for all WebGL rendered layers instead only the current one. Removing the 4 lines that do that doesn't seem to break anything and it fixes the issue.