- Home /
fish tank water distortion Shader
I am trying to make a fish tank water distortion Shader effect with the following requirement:
its a 2D top down prospective.
every object under/in the fish tank has to be distorted, game objects might pass trough/under the fish tank (distortion) and game object might pass over the fish tank (no distortion) as well.
the fish tank does not follow the main camera.
I try to search online and most of the solution I get is to apply the shader to an object or to the main camera which will not meet requirement 3 or 2, can someone give me an ideal on what is the best way to deal with this ? I am working on a mobile game so the solution has to be light weighted on processing power. Many thanks !
In what way would adding the shader to an object not fit the criteria of 2 and 3? As long as the object isn't attached to the camera, it should work fine. For the shader, you could write your own, or there are various available on the internet/the water shader included with the Unity Standard Assets environment package. Refraction is never going to be particularly light weight, so if you're worried about performance it might not be the best of ideas.
if i add the shader to the fish tank object which is transparent, any object that pass under/trough the fish tank will not be distorted ...
Your answer
![](https://koobas.hobune.stream/wayback/20220612113313im_/https://answers.unity.com/themes/thub/images/avi.jpg)