未验证 提交 bf3e9267 编写于 作者: W WestLangley 提交者: GitHub

Merge pull request #22288 from WestLangley/dev_shaders_schlick

Shaders: F_Schlick dotLH -> dotVH
......@@ -134,9 +134,9 @@ vec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 view
float dotNL = saturate( dot( normal, incidentLight.direction ) );
float dotNV = saturate( dot( normal, viewDir ) );
float dotNH = saturate( dot( normal, halfDir ) );
float dotLH = saturate( dot( incidentLight.direction, halfDir ) );
float dotVH = saturate( dot( viewDir, halfDir ) );
vec3 F = F_Schlick( f0, f90, dotLH );
vec3 F = F_Schlick( f0, f90, dotVH );
float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );
......@@ -313,12 +313,10 @@ vec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in Ge
vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );
//float dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );
//float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
float dotNH = saturate( dot( geometry.normal, halfDir ) );
float dotLH = saturate( dot( incidentLight.direction, halfDir ) );
float dotVH = saturate( dot( geometry.viewDir, halfDir ) );
vec3 F = F_Schlick( specularColor, vec3( 1.0 ), dotLH );
vec3 F = F_Schlick( specularColor, vec3( 1.0 ), dotVH );
float G = G_BlinnPhong_Implicit( /* dotNL, dotNV */ );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册