13-12-2019, 10:08 AM
(13-12-2019, 10:01 AM)josemendez Wrote: Hi,Excellent) now it works like you) thanks.
I found the culprit, seems like a bug in Unity. Turns out the camera depth texture accessible to the shaders isn't cleared to the correct value in OpenGLES unless the camera is explicitly told to render a depth texture. I will raise a bug report.
Found out that I had a regular (deactivated) FluidRenderer attached to the camera. The presence of this renderer set the camera depthTextureMode, so the SimpleFluidRenderer worked well.
Removing the FluidRenderer allowed me to reproduce the issue.
Simply adding this line to the SimpleFluidRenderer's Setup() method fixes it:
Code:GetComponent<Camera>().depthTextureMode |= DepthTextureMode.Depth;
Attaching the updated SimpleFluidRenderer for convenience.