-
Notifications
You must be signed in to change notification settings - Fork 42
fix: Multiple layers not including default shaderModules
and layer.opacity
not used in fragment shader
#2572
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: Multiple layers not including default shaderModules
and layer.opacity
not used in fragment shader
#2572
Conversation
Using `super.getShaderModules({})` injects the default layer modules, e.g. `layerUniforms` which is required to access `props.opacity` in the fragment shader via `layer.opacity`
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.
Seems good to me.
Waiting for the upload for other layers, as discussed.
BTW, shouldn't the 2 last lines of
This should not be part of a vertex shader, right ? |
Grid3DLayer
not including default shaderModules
and layer.opacity
not used in fragment shadershaderModules
and layer.opacity
not used in fragment shader
shaderModules
and layer.opacity
not used in fragment shadershaderModules
and layer.opacity
not used in fragment shader
Good question. This seems to apply a highlighting to entities. In deck.gl layers, this is also called within the vertex shader. So either we are doing it right or they are doing it wrong. I suggest we look at this later and not as part of this PR. |
I gave a look and understand better. I counted 14 shader files without DECKGL_FILTER_COLOR. In any case, all (most) of them should apply the layer.opacity. Here is the list: # should support layer.alpha and picking (thus DECKGL_FILTER_COLOR)
src/layers/axes/box.fs.glsl.ts
src/layers/axes/box.vs.glsl.ts
src/layers/gpglLayers/triangleLine.fs.glsl.ts
src/layers/gpglLayers/triangleLine.vs.glsl.ts
src/layers/grid3d/line.vs.glsl.ts
src/layers/map/line.vs.glsl.ts
src/layers/triangle/line.fs.glsl.ts
src/layers/triangle/line.vs.glsl.ts
# should support layer.alpha
# and probably also not picking (thus no DECKGL_FILTER_COLOR)
src/layers/northarrow/northarrow.fs.glsl.ts
src/layers/northarrow/northarrow.vs.glsl.ts
src/layers/piechart/piechart.fs.glsl.ts
src/layers/piechart/piechart.vs.glsl.ts
# should not support picking (thus no DECKGL_FILTER_COLOR)
# and probably no layer.alpha (should be considered like the distance ruler)
src/layers/axes2d/label.fs.glsl.ts
src/layers/axes2d/label.vs.glsl.ts
src/layers/axes2d/line.fs.glsl.ts
src/layers/axes2d/line.vs.glsl.ts
# utility, should not be changed at all
src/layers/shader_modules/decoder.fs.glsl.ts Do you feel to handle that in this PR, or do you prefer to handle that appart ? |
Using
super.getShaderModules({})
injects the default layer modules, e.g.layerUniforms
which is required to accessprops.opacity
in the fragment shader vialayer.opacity
.References:
Layers changed: