4 ms·
By rasterizing the SDF in the shader, are you referring to slicing multiple planes through the volume and sampling the function in the shader (as described in h
by hjaarnio 6y ago
By rasterizing the SDF in the shader, are you referring to slicing multiple planes through the volume and sampling the function in the shader (as described in https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-triangles/chapter-39-volume-rendering-techniques https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-...), or some other technique I'm not aware of?
- user-the-name 6y agoWell-formed SDFs are extremely efficient to raycast. The basic idea is that if you evaluate the SDF at a given point, you get the distance to the nearest surface. Thus, you know it is safe to step that far in any direction without crossing a surface. So you can step along a ray with a step size determined by the SDF at each point to quickly converge on a surface.
- jmiskovic 6y agoThat is a good explanation of ray casting with ray marching as optimization. Here is interactive implementation from Quilez: https://www.shadertoy.com/view/Xds3zN https://www.shadertoy.com/view/Xds3zN How would you end up with badly-formed SDFs?
- user-the-name 6y agoHonestly, most SDFs you use in practice will be badly formed. Creating a well-formed SDF is very, very hard, and only possible in a few special cases. So in practice what you try to do is find an SDF that is not TOO far off from what it should be. Ideally, it should always have an absolute value that is equal to or less than (but not by too much) the real, ideal SDF.
- andybak 6y agoDepending on your goals - the failure modes of non-well-formed SDFs are often quite interesting. ;-)