Unity-Raymarching-Glass
Unity-Raymarching-Glass copied to clipboard
Unity-Raymarching-Glass
Based on Scattered Honey by fizzer. I think there are many turoials on how to implement Shadertoy's shaders in Unity. But I couldn't really find any clear resource explaining how to cope with GLSL's texelfetch. This was particularly true when it came to sampler3D. Accorrding to this thread on the Unity forum, it seems that you have a few options to handle this conversion. For me, Texture3D.Load() was the only functional method this time.
In addition, you need to create a 3D noise texture via script, unlike Shadertoy.It is the equivavlent of the volume input of RGBA Noise3D on Shadertoy. I found this example quite helpful.