码迷,mamicode.com
首页 > 其他好文 > 详细

使用RampTexture实现BRDF效果

时间:2014-09-18 14:32:23      阅读:408      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   使用   ar   strong   for   

使用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。

  bubuko.com,布布扣

  使用如下Shader来完成模拟:

  bubuko.com,布布扣

  效果图如下:  

  bubuko.com,布布扣

How it works

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

  bubuko.com,布布扣

  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. 

  bubuko.com,布布扣

  

  

使用RampTexture实现BRDF效果

标签:style   blog   http   color   io   使用   ar   strong   for   

原文地址:http://www.cnblogs.com/tekkaman/p/3979032.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!