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

Add RayQuery::confirm_intersection #822

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

expenses
Copy link
Contributor

@expenses expenses commented Dec 9, 2021

I spent like 20 minutes looking for this one before realising that it wasn't implemented 😅

You need this if the ray query flags do not contain RayFlags::OPAQUE, as otherwise a while ray.proceed() {} will just skip through all the candidate intersections without confirming any of them. Essentially, you need it for alpha clipping and stuff like that. See here for an example: https:/expenses/transmission-renderer/blob/c5dbd648e513def2719f3971fd5d9c8ce992ba63/shader/src/lib.rs#L736-L766

/// execution of [`Self::proceed`] with the same ray query object must have
/// been true. Refer to the client API specification for more details.
Copy link
Contributor Author

@expenses expenses Dec 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this line just because it wasn't consistent with the rest of the docs and seems to have just been copied from https:/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_ray_query.asciidoc.

@khyperia khyperia enabled auto-merge (squash) December 9, 2021 12:57
@khyperia khyperia merged commit da7c3ed into EmbarkStudios:main Dec 9, 2021
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