my problem might be very simple for someone experienced in shaders, but I am fighting with it already for half a day:)
Basically I have a manualObject, which works as a fog above terrain. The fog material has scene_blend alpha_blend and depth_check off.
It all works fine but there are cases (specific camera angles) when I can see the faces of the fog which I shouldnt see. I need to somehow detect that these triangles should not be rendered and set its alpha to 0 in shader.
Do you have any ideas how to do this?
As far as I understand it, these triangles are rendered because the depth_check is off (and I need it off) and they are less transparent (more distinct) because the pixel is rendered with the fog triangles which are on the other side and should be rendered (that is why it is less transparent than the rest of the fog). I think that this means that these are actually the back faces of the triangle? How to detect that the rendered triangle faces the camera the other way and should not be rendered?
Thank you for any advice





