Skip to content

ScreenGrid layer affects rendering of other layers in layer browser #602

Closed

Description

@ericsoco

A number of layers render incorrectly when the ScreenGridLayer is turned on in the layer browser:

HexagonCellLayer + ScreenGridLayer

PointCloudLayer + ScreenGridLayer

Not sure if this is a regression or a long-standing never-before-noticed bug.

Activity

  1. ericsoco commented on Apr 27, 2017

    @ericsoco
    ContributorAuthor

    Or...is this intended behavior? If so, we should update the docs to indicate this is what is meant by _Screen_Grid.

  2. howtimeflies0 commented on Apr 27, 2017

    @howtimeflies0

    No.. this is not intended but it's been there for quite some time. Thanks for creating the issue to track it.

  3. ibgreen commented on Aug 18, 2017

    @ibgreen
    Collaborator

    Looks like z-buffer pollution?

  4. added this to the milestone on Aug 21, 2017
  5. 1chandu commented on Aug 23, 2017

    @1chandu
    Contributor

    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 :

    1. Disable depth writes in ScreenGrid layer.
    2. 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.

    CC: @ibgreen @shaojingli @Pessimistress

  6. ibgreen commented on Aug 23, 2017

    @ibgreen
    Collaborator
    1. Disable depth writes in ScreenGrid layer.
    2. 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?

  7. self-assigned this
    on Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions