24 ms·
This DirectX raytracing sample does a variant of shadertoy style raymarching. https://github.com/Microsoft/DirectX-Graphics-Samples/tree/master/Samples/Desktop
by Impossible 8y ago
This DirectX raytracing sample does a variant of shadertoy style raymarching.
https://github.com/Microsoft/DirectX-Graphics-Samples/tree/master/Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingProceduralGeometry https://github.com/Microsoft/DirectX-Graphics-Samples/tree/m...
This is basically a rewrite of iq's primitive shadertoy using DXR, with additional, non-SDF objects like metaballs. https://www.shadertoy.com/view/Xds3zN https://www.shadertoy.com/view/Xds3zN
I'm not sure how much of a speed up you'd get from using this API though. Most of the complex shadertoy shaders are unoptimized and brute-force given the limitations of the environment, and you can render similar scenes without a raytracing API using similar techniques in more efficient ways. The talk on Claybook at GDC 2018 or Alex Evan's Siggraph 2015 talk are good examples of ways to scale procedural sign distance field rendering. They both assume dynamic scenes or user edited content, there are probably other tricks that could be used to accelerate mostly static content.
- andybak 8y agoLinks to the two talks mentioned (I think...): https://www.youtube.com/watch?v=Xpf7Ua3UqOA https://www.youtube.com/watch?v=Xpf7Ua3UqOA https://www.youtube.com/watch?v=u9KNtnCZDMI https://www.youtube.com/watch?v=u9KNtnCZDMI