Tekkaman

导航

 

使用RampTexture实现BRDF效果

  BRDF stands for bidirectional reflectance distribution function. While that is a mouthful, it simply means the way in which light is reflected off an opaque surface from both the view direction and the light direction

  BRDF指光从view-direction、light-direction2个方向散射出去。

  首先,需要创建一张适用于BRDF的RampTexture。

  

  使用如下Shader来完成模拟:

  

  效果图如下:  

  

How it works

  The following image shows the dot product of the view direction and the surface normal. 

  

  Since the diffLight calculation and the rimLight calculation both produce a linear range of values from 0 to 1, we can use both the ranges to pick different areas of the ramp texture. 

  

  

  

posted on 2014-09-18 13:10  Tekkaman  阅读(655)  评论(0编辑  收藏  举报