高光BRDF化简公式
来源:互联网 发布:手机淘宝加入购物车 编辑:程序博客网 时间:2024/06/05 02:26
源:http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html
Specular BRDF Reference
First let me define alpha that will be used for all following equations using UE4's roughness:
Normal Distribution Function (NDF)
The NDF, also known as the specular distribution, describes the distribution of microfacets for the surface. It is normalized [12] such that:Blinn-Phong [2]:
Beckmann [3]:
GGX (Trowbridge-Reitz) [4]:
GGX Anisotropic [5]:
Geometric Shadowing
The geometric shadowing term describes the shadowing from the microfacets. This means ideally it should depend on roughness and the microfacet distribution.Implicit [1]:
Neumann [6]:
Cook-Torrance [11]:
Kelemen [7]:
Smith
The following geometric shadowing models use Smith's method[8] for their respective NDF. Smith breaksBeckmann [4]:
Blinn-Phong:
The Smith integral has no closed form solution for Blinn-Phong. Walter [4] suggests using the same equation as Beckmann.
GGX [4]:
Schlick-Beckmann:
Schlick [9] approximated the Smith equation for Beckmann. Naty [1] warns that Schlick approximated the wrong version of Smith, so be sure to compare to the Smith version before using.
Schlick-GGX:
For UE4, I used the Schlick approximation and matched it to the GGX Smith formulation by remapping
Fresnel
The Fresnel function describes the amount of light that reflects from a mirror surface given its index of refraction. Instead of using IOR we instead use the parameter orNone:
Schlick [9]:
Cook-Torrance [11]:
Optimize
Be sure to optimize the BRDF shader code as a whole. I choose these forms of the equations to either match the literature or to demonstrate some property. They are not in the optimal form to compute in a pixel shader. For example, grouping Smith GGX with the BRDF denominator we have this:float a2 = a*a;
float G_V = NoV + sqrt( (NoV - NoV * a2) * NoV + a2 );
float G_L = NoL + sqrt( (NoL - NoL * a2) * NoL + a2 );
return rcp( G_V * G_L );
If you are using this on an older non-scalar GPU you could vectorize it as well.
References
[1] Hoffman 2013, "Background: Physics and Math of Shading"[2] Blinn 1977, "Models of light reflection for computer synthesized pictures"
[3] Beckmann 1963, "The scattering of electromagnetic waves from rough surfaces"
[4] Walter et al. 2007, "Microfacet models for refraction through rough surfaces"
[5] Burley 2012, "Physically-Based Shading at Disney"
[6] Neumann et al. 1999, "Compact metallic reflectance models"
[7] Kelemen 2001, "A microfacet based coupled specular-matte brdf model with importance sampling"
[8] Smith 1967, "Geometrical shadowing of a random rough surface"
[9] Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering"
[10] Karis 2013, "Real Shading in Unreal Engine 4"
[11] Cook and Torrance 1982, "A Reflectance Model for Computer Graphics"
[12] Reed 2013, "How Is the NDF Really Defined?"
0 0
- 高光BRDF化简公式
- 高光BRDF化简公式总结(转)
- 高光BRDF化简公式总结(转)
- 高光BRDF 公式参考
- BRDF
- brdf
- 基于物理着色:BRDF 公式近似简化推导
- 高光简历制作
- 去掉Icon高光
- icon 图标 高光
- specular高光贴图
- 顶点高光.Shader
- 片段高光.Shader
- 高光反射
- 边缘高光实现
- 高光效果
- 高斯公式,斯克托斯公式
- 图像处理——光效公式
- 在jQuery中使用el表达式来设置默认选中值
- windows系统下搭建svn服务器
- worldwind参考博客
- unity5+Vuforia SDK5实现高通AR在unity下的环境构建
- Linux 菜鸟笔记(一)
- 高光BRDF化简公式
- leetcode系列(31)Longest Substring Without Repeating Characters 最长不重复子串
- lucene4.4与IKAnalyzer的冲突
- 音乐播放器app开源代码
- Java的GC机制详解
- 《Cocos2d-x实战(卷Ⅰ):C++开发》目录 (仅供参考)
- SOCKET访问基本模型
- oracle触发器
- Tomcat+Servlet保存Cookie到浏览器