Hi everyone,
I’m looking for an example for a ray tracing shader that I could implement in UE5.
I have several question about how to implement it, and a simple example could clarify many of these.
These are mainly my questions:
- How do I get the accelerated structure from the scene? (I want to use the existing geometries)
- I want to trace my rays a bit unconventionally; from a rect, towards the side (i.e. not from the plane normal), so I want to know if I can control the amount of rays being shot. from my understanding the amount is restricted to the current camera pixel amount.
- how do I declare the different shaders such as closesthit and anyhit?
- Where can I find the mapping between the instance index in the attribute of the hit to the actual geometry and object in scene.