Fresnel Effect 示例
This material graph sample demonstrates how to implement the Fresnel effect with respect to a normal map used when creating materials.此材质图表示例演示了如何针对创建材质时使用的法线贴图实现菲涅耳效果。
The data from the Albedo texture is sampled (in accordance with the default UV) by the Sample Texture node connected to the Albedo port of the master material node.来自 Albedo 纹理的数据由连接到主材质节点的 Albedo 端口的 Sample Texture 节点采样(根据 default UV)。
The tangent-space normal data taken from the Normal texture is passed to the Fresnel node accountable for the effect intensity, the effect power is controlled by the Power Slider parameter node. Thus the Fresnel effect is based on data from the normal map and not the vertex normals.从 Normal 纹理获取的切线空间法线数据被传递到负责效果强度的 Fresnel 节点,效果功率由Power控制滑块参数节点。因此,菲涅耳效应是基于来自法线贴图的数据,而不是顶点法线。
The output multiplied by the color from the Color parameter node (enabling you to adjust a color value via the Parameters panel in UnigineEditor) is plugged into the Emission port of the material. Thus the emission color is applied only in the areas where the fresnel effect takes place.输出倍增通过来自 Color 参数节点的颜色(使您能够通过 UnigineEditor 中的 Parameters 面板调整颜色值)插入材质的 Emission 端口。因此,发射颜色仅应用于发生菲涅耳效应的区域。