Skip to content
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

Messing with Z #3784

Closed
wants to merge 1 commit into from
Closed

Messing with Z #3784

wants to merge 1 commit into from

Conversation

emackey
Copy link
Contributor

@emackey emackey commented Mar 28, 2016

Proposed fix for #2885! Someone with gl_FragDepthEXT experience should review this, as I actually haven't messed with that extension before.

The basic idea is to push the Z values of the fringes of points, since they have low alpha values, towards the back of the current frustum. That way, nearby objects have a better chance of winning any Z battles with those fringes.

I haven't done extensive testing on this, actually I just thought of it about an hour ago. If it seems to work well, we might look for additional uses, for example the fringes around labels.

@pjcozzi
Copy link
Contributor

pjcozzi commented Apr 4, 2016

Do you have a before/after screenshot? It would be interesting to see large points together with 3D models or primitives where the 3D models end up occluding the point fringes, but not the point itself. This part of the point will look aliased, correct? So we are just trading one problem for another with a fudge factor? Could be OK if the new problem isn't as bad. It might also be instructive to try this with billboards/labels to see what the artifacts look like.

The only other comments I have is if this needs to clamp to the far plane and what the best function is (and why-ish!).

Also, this will disable early-z, which could have a significant performance impact on fragment-bound scenarios, e.g., lots of (big) points in a single collection.

@emackey
Copy link
Contributor Author

emackey commented Oct 19, 2016

We'll find a different solution.

@emackey emackey closed this Oct 19, 2016
@emackey emackey deleted the push-back-point-outlines branch November 27, 2016 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants