Light Function Height Limit

I have my own volumetric clouds in a scene, and I generate shadows for these clouds. The shadows are generated using a light function.

However, the shadows are projected on objects above the clouds, so is there a way to use a light function to create shadows only upto a certain height (the height of the clouds), so I can have objects above the clouds that are not shadowed.


You can use the B component of Absolute World Position inside your light function material to fade out the shadows (or just sharply cut them off) above a certain height.

1 Like

Yes this is what I was looking for, thanks!