You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ScreenGrid layer affects rendering of other layers in layer browser #602
The problem here is depth test and order of rendering. ScreenGrid layer renders in screen space with z value of 0.0 which happens to be occluding other layers. Layers that are rendered before (any layer that is listed above ScreenGrid in UI) are fine as they get blended with ScreenGridLayer, but all other layers rendered after (layers listed below ScreenGrid) seems to be get occluded. Couple of options to fix :
Disable depth writes in ScreenGrid layer.
Re-order the layers in layer-browser example, so that ScreenGrid is rendered last.
I prefer 2, as this problem occurs only when multiple layers are rendered and 2 only changes the example.
Re-order the layers in layer-browser example, so that ScreenGrid is rendered last.
Isn't there an option 3 - disable depth writes not in the ScreenGridLayer itself but in the application (layer-browser) by adding:
parameters: {
depthMask: false
}
to the props when rendering the layer.
This would have the added benefit of providing a test case for our new parameters prop.
I prefer 2, as this problem occurs only when multiple layers are rendered and 2 only changes the example.
FWIW, I always imagined a ScreenSpace named layer would be special in this sense. But perhaps there are complications with doing that. I don't have a strong sense for what the right trade-off is. For now maybe use option 3?
Activity
ericsoco commentedon Apr 27, 2017
Or...is this intended behavior? If so, we should update the docs to indicate this is what is meant by _Screen_Grid.
howtimeflies0 commentedon Apr 27, 2017
No.. this is not intended but it's been there for quite some time. Thanks for creating the issue to track it.
ibgreen commentedon Aug 18, 2017
Looks like z-buffer pollution?
1chandu commentedon Aug 23, 2017
The problem here is depth test and order of rendering. ScreenGrid layer renders in screen space with z value of 0.0 which happens to be occluding other layers. Layers that are rendered before (any layer that is listed above ScreenGrid in UI) are fine as they get blended with ScreenGridLayer, but all other layers rendered after (layers listed below ScreenGrid) seems to be get occluded. Couple of options to fix :
I prefer 2, as this problem occurs only when multiple layers are rendered and 2 only changes the example.
CC: @ibgreen @shaojingli @Pessimistress
ibgreen commentedon Aug 23, 2017
Isn't there an option 3 - disable depth writes not in the
ScreenGridLayeritself but in the application (layer-browser) by adding:to the props when rendering the layer.
This would have the added benefit of providing a test case for our new
parametersprop.FWIW, I always imagined a
ScreenSpacenamed layer would be special in this sense. But perhaps there are complications with doing that. I don't have a strong sense for what the right trade-off is. For now maybe use option 3?