Reflectance dependent on the viewing angle

The tendency of the reflectance of a material to depend on the viewing angle is called the Fresnel effect. A material may be more specular from a grazing angle than from a head-on angle.

Reflectance dependent on the viewing angle

Note

The Fresnel effect has magnitude at a grazing angle. This water material seen in the preceding screenshot has high specularity and opacity at a grazing angle due to use of the Fresnel effect.

UE4 has a specially built-in capability to account for this. We'll construct a water shader that has view-angle dependence for translucency to give an example of how to use the Fresnel effect realistically.

Getting ready

You need a ...

Get Unreal Engine 4 Scripting with C++ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.