Hello all.
I am using a multiple camera setup with a depth camera and a far camera. I am rending the boat to the depth camera and suimono to the far camera.
The ship is large and has decks that are under water. I am trying to get the under water shader to render to the far camera only so that the water appears outside the ships through the windows in the below decks.
So far the shader renders to the depth camera even with manual camera and camera set on module to the far camera. I cant seem to find in the code how it is rendering this shader to what camera and I need to be able to control what camera the under water shader renders too.
So far the system works the water does not clip though the ship, however the underwater fog is inside the ship on the near depth camera instead of on the far camera so i have the appearnce of being underwater outside the ship while the player is below decks and the water plane.
Thank you,
johnny brown
PS.
I see that the shader is being passed through "surfaceRenderer" but where are the camera controls. I want to force the underwater shader to render to my far clipping camera.
......
cam = gameObject.GetComponent<Camera>() as Camera;
if (suimonoModuleObject != null && suimonoModuleObject.setCamera != null){
copyCam = suimonoModuleObject.setCamera.GetComponent<Camera>();
}
Am I onto something here, perhaps i should try switching this to my far camera see what happens.
......
Ok with my current setup being I have a Near Depth Camera and a Far camera. The ships is being redered to the Depth camera and suimono to the far camera. I have it working where the ocean does not clip through the boat boat the underwater shader will not render texture to my far camera because I am assuming it only renders to a depth camera?
Can I render the under water fog shader to a non depth camera?
.....
I have done it. I have water outside the windows on the bottom decks of the ship as the waves pass by and no water on the interior and im not using the depth plane shader
The only thing i need to do is disable underwater effects on some low lying areas of the exterior of the ship.