Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Add RayQuery::confirm_intersection#822

Merged
khyperia merged 1 commit intoEmbarkStudios:mainfrom
expenses:confirm-intersection
Dec 9, 2021
Merged

Add RayQuery::confirm_intersection#822
khyperia merged 1 commit intoEmbarkStudios:mainfrom
expenses:confirm-intersection

Conversation

@expenses
Copy link
Copy Markdown
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://github.com/expenses/transmission-renderer/blob/c5dbd648e513def2719f3971fd5d9c8ce992ba63/shader/src/lib.rs#L736-L766

/// [`Self::proceed`] will return `false`.The value returned by any prior
/// [`Self::proceed`] will return `false`. The value returned by any prior
/// 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
Copy Markdown
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://github.com/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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants