Download

masking light function for water caustics

hey guys, so i’m messing around with light functions for water caustics, my level is about 30% water. I tried with point lights but that took performance down too much, so i tried with my directional light and that works great, the problem, as expected, is that it goes everywhere, so i have exported one of my landscape paint layers, figured i could use it as a mask, only i have no idea how to use it properly or if it can even be done in a light function.

small vid of what i have so far:
[video]- YouTube

please send help :smiley:

6153012ba654eb9796884c5cf19e22cede0c4aea.jpeg

I use global water level and mask effect when worldposition.z is above that.

Or if you want you can mask with vector color. You can paint where you want the caustic effect and lerp it or add it with the specific channel you paint :slight_smile:

You just need to type VectorColor in the material and it grabs the information from the object. And then you paint where you want with the brush in the top left panel (next to landscape)