Fresnel Effect Sample
This material graph sample demonstrates how to implement Fresnel effect when creating materials.
Opacity value (fully opaque) for the Deferred PBR Material master material node is specified directly via port adapter.
The data from the Albedo and Normal Map textures is sampled (in accordance with the default UV) by the two Sample2D nodes connected via the xyz port adapter to the Albedo and Normal ports of the Deferred PBR Material master material node respectively.
The Fresnel effect is implemented using the Fresnel_effect_advanced basic node with the following two inputs:
- first two components from the tangent-space Normal Map texture data selected by the xy port adapter.
- Fresnel Power provided by the Float Slider node (enabling you to adjust float values via the Parameters panel in the UnigineEditor).
The output multiplied (Mul node) by the color provided by the Color (enabling you to adjust a color value via the Parameters panel in the UnigineEditor) is plugged into the Emission port of Deferred PBR Material master material node. Thus the emission color is applied only in the areas, where the fresnel effect takes place.
Finally, the data output is passed to the Final Material node.