Skip to content

WebGPUPathTracer: Add support for opacity during BVH traversal#751

Open
gkjohnson wants to merge 6 commits intowebgpu-pathtracerfrom
webgpu/transparency
Open

WebGPUPathTracer: Add support for opacity during BVH traversal#751
gkjohnson wants to merge 6 commits intowebgpu-pathtracerfrom
webgpu/transparency

Conversation

@gkjohnson
Copy link
Owner

@gkjohnson gkjohnson commented Mar 22, 2026

  • Add a 1D PCG random function
  • Merge the "hit" and "ray" queues to free up a storage buffer slot
  • Check the opacity of the object material on triangle intersection, continue traversal if transparent
  • Skip traversal of the object entirely if opacity is set to 0

This should reduce the number of raycasts required for transparent surfaces.

Future

  • Sample and include albedo and alpha map opacity
  • We could handle triangle sided-ness this way, as well?

cc @TheBlek

image

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.

1 participant