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

Update gl_CullDistance.xhtml #128

Merged
merged 1 commit into from
Oct 23, 2022
Merged

Conversation

peterekepeter
Copy link
Contributor

@peterekepeter peterekepeter commented Oct 23, 2022

I updated a few things which I think are honest small mistakes.

Though that said I think the distance explanation for gl_ClipDistance and gl_CullDistance are really confusing.

Both have the same paragraph for describing what the distance means:

A distance of 0.0 means that the vertex is on the plane, a positive distance means that the vertex is insider the clip plane, and a negative distance means that the point is outside the clip plane. The clip distances will be linearly interpolated across the primitive and the portion of the primitive with interpolated distances less than 0.0 will be clipped.

I have the problem specifically with "on a plane", "inside a plane" and "outside a plane" Since a plane has no volume I'd interpret the inside of a plane as being on the plane if I didn't have any graphics programming experience. Sure a plane can have orientation then you can have in front of a plane or behind a plane.

A distance of 0.0 means that the vertex is on the plane, a positive distance means that the vertex is insider the cull volume, and a negative distance means that the point is outside the cull volume. Primitives whose vertices all have a negative clip distance for plane i will be discarded.

Here I find it really strange that primitives outside the cull volume are discarded. I'd expect the primitives inside the cull volume to be discarded with and those outside the volume untouched.

That said I have not used these language features to be comfortable to changing the paragraphs themselves on my own.

@peterekepeter
Copy link
Contributor Author

I see this text originates from the official spec itself. Is docs.gl meant to be a searchable replica of the spec? or are user edits to the pages welcome?

@BSVino BSVino merged commit f87759d into BSVino:mainline Oct 23, 2022
@BSVino
Copy link
Owner

BSVino commented Oct 23, 2022

I would welcome objectively better descriptions, which I think yours are. I would want to avoid people having debates about what's better or making significant changes. But yea the change you described looks definitely better to me, I'd love to see a PR for it.

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