Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

collision debug doesn't work reliably #5055

Closed
jfirebaugh opened this issue May 17, 2016 · 4 comments
Closed

collision debug doesn't work reliably #5055

jfirebaugh opened this issue May 17, 2016 · 4 comments
Labels

Comments

@jfirebaugh
Copy link
Contributor

Turning on collision debug option results in some tiles showing it and other tiles not showing it. As you pan and zoom, it turns on and off on a tile-by-tile basis unpredictably.

@brunoabinader
Copy link
Member

I've noticed that debug collisions are rendered as expected when using a style with raster layer only:
screen shot 2016-10-07 at 6 21 37 pm

However, debug collisions are only rendered on the tiles appearing on the bottom right corner for the examples below:
screen shot 2016-10-07 at 6 21 31 pm
screen shot 2016-10-07 at 6 21 45 pm

@brunoabinader
Copy link
Member

Given the examples above, my suspicion is that somehow the tile size affects the way how the collision debug is rendered.

@brunoabinader
Copy link
Member

Given the examples above, my suspicion is that somehow the tile size affects the way how the collision debug is rendered.

Even though we don't always enable stencil test when rendering symbols, we do render collision using the same stencil function. This gets updated on each render call, but only if the bucket needs clipping.

In the cases above, the render result was unpredictable because it used the last stencil function set by the previous bucket that needed clipping.

@jfirebaugh
Copy link
Contributor Author

Thanks for investigating!

In the cases above, the render result was unpredictable because it used the last stencil function set by the previous bucket that needed clipping.

This means it's a good example of a bug that will be fixed by #6468.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants