zoukankan      html  css  js  c++  java
  • Fresnel Reflection Shader

    Fresnel Reflection

      One of the most used types of reflections is the Fresnel reflection. One of the most used surfaces of this type of effect is the body of a car. 

      Fresnel Reflection有点像RimLight。在Shader实现上,也是借鉴了RimLight的算法来扰动Emission颜色。

      为了实现Shader,我们需要一个Cubemap,及Specular、Rim的相关强度信息,如下:

      

      另外,引用需要用到的内置变量:

      

      最后实现代码如下:

      

      最终效果图:

      

    How it works

      左边2图展示RimLight效果,右边2图展示Cubemap+Rimlight效果。

      

      

      

  • 相关阅读:
    基本内置类型
    多维数组
    数组
    迭代器
    标准库类型 vector
    标准库类型 string
    运算符优先级表
    类型转换
    sizeof 和逗号运算符
    位运算符
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3981908.html
Copyright © 2011-2022 走看看