wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

Custom geometry for acceleration structures

Open gavrix32 opened this issue 7 months ago • 6 comments

I would really like to use acceleration structure for my custom AABB geometry (I am writing a voxel engine). Is it possible now? If not, I would like to know when this feature will appear.

gavrix32 avatar May 19 '25 00:05 gavrix32

it's not implemented yet and listed as part of the tracking issue:

  • https://github.com/gfx-rs/wgpu/issues/6762

Raytracing is an experimental feature that's still under development. Keeping this open and linking on the tracking issue instead.

Wumpf avatar May 19 '25 19:05 Wumpf

I think @Jaisiero had an implementation working (https://github.com/gfx-rs/wgpu/issues/1040#issuecomment-2460208883).

Vecvec avatar May 19 '25 20:05 Vecvec

I think @Jaisiero had an implementation working (#1040 (comment)).

Unfortunately it's not fully functional since procedural ray query is pretty involved (Niagara support?), so you need to iterate through your AS until you accept whatever you feel like it's a hit. Here's a code from Khronos fully testing: rayQuery-allOps

Jaisiero avatar May 20 '25 01:05 Jaisiero

procedural ray query is pretty involved (Niagara support?

Naga support was added in #7047 (if that's what you're asking about).

Vecvec avatar May 20 '25 03:05 Vecvec

procedural ray query is pretty involved (Niagara support?

Naga support was added in #7047 (if that's what you're asking about).

Yes! That's what I meant. I am going to check it out. Thanks.

Edit: what's the branch that I should look into? I would like to try to implement procedural geometry support for inline Ray Query.

Jaisiero avatar Jun 11 '25 17:06 Jaisiero

I know they are on trunk, I think they were released in v25 as well. If you are adding features it's usual to target trunk though.

Vecvec avatar Jun 12 '25 03:06 Vecvec