I'm working on Unity3D for a fish shooting game. I'm implementing the underwater caustic effect for fishs. I'm using "BlobLightProjector" in StandardAsset of Unity with an attached script to change the texture every frame by :
public Texture2D[] frames;
private int frameIndex;
private Projector projector;
...
// repeat every frame
projector.material.SetTexture("_ShadowTex", frames[frameIndex]);
frameIndex = (frameIndex + 1) % frames.Length;
My list caustic textures look like this :
Now the problem is I want the projector only affect the upper parts of the fish (even though I rotate my fish to any direction), that is something look like this :
Could you give me some advices how to do it, or other solution don't use projector is good so.
it seems to me that you're going to need to use a custom Shader. I'll be honest I'm no expert on them but there was a Unite 2016 on shaders which had an example very similar to this.
I'm sorry I don't have any code for you but I hope this will be at least a small step in the right direction