Forum begins after the advertisement:

Problem with getting the Underwater Effect working in the YouTube short

Home Forums Video Game Tutorial Series Creating an Underwater Survival Game in Unity Problem with getting the Underwater Effect working in the YouTube short

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #11984

    I am working with the water creation video on Unity however by following this one perfectly I do not have the expected result
    I’m supposed to have a fog or at least a semblance of water but I only have water and not its contents underneath. I show you this just below and tell me what the solutions are thank you again.


    Hi Gaetoush, there are a few things you want to check:

    1. You need to start Play-in-Editor for the effect to show up. In your recorded video, your game doesn’t seem to be playing.
    2. Ensure that you have a child GameObject under the Water Body. This GameObject should contain a plane that is facing downwards, opposite of the direction of your Water Body’s surface, and it should be assigned to the Water Surface layer.
    3. Make sure your Water Body GameObject is set to be under the Water layer. This isn’t mentioned in our video.
    4. Another thing that isn’t mentioned in the video is the Depth Layers property under the CameraUnderwaterEffect component needs to be set to select everything except the Water layer. See the screenshot below for reference.

    Let me know if this helps!


    thank you for helping me
    I return the changes you advised me (I tried to show you the changes made) however even when launching my game, it did not change anything


    Hi Gaetoush,

    In your CameraUnderwaterEffect.cs script, can you remove the following lines and see if the effects apply?

        //This is where the image effect is applied
        private void OnRenderImage(RenderTexture source, RenderTexture destination)
            if (material && inWater)
                //Update the depth render texture
                //We pass the information to our material
                material.SetColor("_DepthColor", depthColor);
                material.SetFloat("_DepthStart", depthStart);
                material.SetFloat("_DepthEnd", depthEnd);
                //Apply to the image using blit
                Graphics.Blit(source, destination, material);
                Graphics.Blit(source, destination);
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Go to Login Page →

Advertisement below: