Fresnel as opacity mask causes odd shadow behavior

Hello there

I need the effect of a plane disappearing when near parallel to camera vector.
I simply used a fresnel node on opacity mask channel and it worked. But the plane is not casting shadows properly. Here is what happens:

  1. When the plane facing the camera it casts shadows fine.

  1. It’s disappearing as the camera gets parallel to it. The shadow also disappears. Everything working as expected.

  1. Now when the plane is backwards (material is two sided) it stops casting shadows. Even though the opacity mask still works as intended.

  1. The light position doesn’t matter. I’ve turned the plane so it’s facing the camera again and the shadow reappeared.

That happens both with movable and stationary Direct Light. The plane is movable.

The material used:

Could anyone help me to understand why this is happening and if there is a way around it?
Thanks in advance! :slight_smile:

https://forums.unrealengine.com/development-discussion/rendering/106533-possible-bug-shadows-disappearing-when-using-fresnel-function-in-masked-material?p=908742#post908742

Wow, totally missed that post on my research. Thanks a lot! :slight_smile: