Raytracing file mesh

Hey any ideas how to run file meshes with the raytracing shaders?

What about just handing the shader a depth buffer? You could just take the closest value if you wanted to combine it with formula geometry. Maybe there is a smarter way but that’s what I would try.

Depth would not work if you want to apply other formulas on top (except union maybe).

Easiest way is to convert your model into a SDF or build some form of Grid then raytrace triangles.

Sdf is easy to build if your mesh is closed and winding is correct, takes little time to build tho so you might want to save it as dds file after.

Which raytracing shader?

Signed Distance Function, okey this one again.
I realy wanted to investigate those methods a while ago.
There is this slide from swoboda…

But the problem would be that you would not be able to use animated meshes if you have the sdf conversion in between.

@sebl: I mean just in general, inspired from shadertoy stuff.

I found out that there are also other ways… and this is like they do for example in a lot of vfx environments like hudini etc.
But mostly represented as cg papers that dont cover any code.

however interesting.

It would be awesome to just have one Rendering Node in the end that makes amazing raytraced shadows, lighting, ssao and so on…