Volume Rendering

Hello!

I want to implement a slice based Volume Rendering with slices perpendicular to the view direction. I already read some papers and the algorithm is clear to me. My problem is that I’ve absolutely no idea how I could implement that in a shader.
Could somebody please be so kind and help me out?

Examples of raymarching in Unity do exist. Slightly more general non-unity examples exist in all sorts of example projects on shadertoy.com as well.

I can’t remember if the following unity fluid thing uses ray marching but it quite likely does. Obviously most of the project is concerned with the actual simulation but you may still find shader code of use:

https://scrawkblog.com/2014/01/09/gpu-gems-to-unity-3d-fluid-simulation/

Another couple of unity related volumetric/ray-marching projects which I haven’t tried and which may vary in relevance to you:

http://www.shadowmint.com/articles/code-volumetric-shader-1/

https://github.com/jaburns/raymarch

Oh yes and searching for ‘unity raymarch’ on github reveals a bunch of results which I’ve not explored properly. Other terms may also yield fruit, its great how many unity experiments end app on github these days :slight_smile:

Thank you very much! I will try those!