I’m trying to setup the foam/shore break with depth transparency of the water plane.
The first problem is that the foam spreads depending on the camera angle. For example sometimes it’s closer to the beach, sometimes it goes further away instead of being fixed.
Is there a way to solve this? I’ve seen people use those vector converters like Vector transform or something but I don’t know how to apply it.
Could that solve the problem or am I on a totally wrong path?
Second question is regarding a z-buffer problem, I guess.
Other objects with alpha underneath the water plane are rendered in front of the water plane eventhough they actually are located behind it. I think this has something to do with zbuffer. Is it possible to avoid this somehow?
For example, the fishes and corals are rendered on top and in the wrong order
Thanks in advance for any help!