Hello!
I have a really big problem that has been bothering me for so long and I can’t seem to find the solution. I have downloaded this project GitHub - brianasu/unity-ray-marching at volumetric-textures (Unitypackage with my project here https://dl.dropboxusercontent.com/u/27758186/ApplicationVolume.unitypackage ) , that is about volume rendering.
The problem is that, as you can see, the volume renders ALWAYS in front of everything else (try placing a cube in front of the cube with the volume). I have tried a lot of things but none seems to work.
I think it might be an issue of the shaders used. In the main Camera, a RayMarching script is attached, which contains an OnRenderImage method, which creates a new Camera (although disabled), and renders the volume.
I don’t know if it is a shader issue, then, or more like a camera issue (is rendering with replaced shaders). I attach my current project for testing so you don’t have to download from git, and I just want the volume (head), to appear behind the rectangles (not seen) when it’s actually behind, and in front when it is, pretty much like an standard geometry, but it appears always on top…
Any help or suggestion would be GREATLY appreciated, I’m kind of desperate as anything works and I’m pretty sure it is a fairly easy issue.
This is the Initial setup ,
and this is the cylinder in front of the object but the volume still rendering on top
Thank you very very much,
Albert.