Blinn-Phong Specular Changes

Based on the work done here:
http://www.garagegames.com/community/blogs/view/21032
This commit is contained in:
DavidWyand-GG 2013-10-29 15:10:23 -04:00
parent f5246bb809
commit 17113d3ba5
25 changed files with 167 additions and 26 deletions

View file

@ -221,7 +221,7 @@ void main()
normal,
normalize( -eyeRay ),
constantSpecularPower,
lightColor.a * lightBrightness );
shadowed * atten * lightBrightness );
// N.L * Attenuation
float Sat_NL_Att = clamp( nDotL * atten * shadowed, 0.0, 1.0 );

View file

@ -148,7 +148,7 @@ void main()
normal,
normalize( -eyeRay ),
constantSpecularPower,
lightColor.a * lightBrightness );
shadowed * atten * lightBrightness );
// N.L * Attenuation
float Sat_NL_Att = clamp( nDotL * atten * shadowed, 0.0, 1.0 );

View file

@ -196,7 +196,7 @@ void main()
normal,
normalize(-wsEyeRay),
constantSpecularPower,
lightColor.a * lightBrightness );
shadowed * lightBrightness );
float Sat_NL_Att = clamp(dotNL, 0.0, 1.0) * shadowed;

View file

@ -213,7 +213,7 @@ float4 main( ConvexConnectP IN,
// Specular term
float specular = AL_CalcSpecular( lightVec,
normal,
normalize( -eyeRay ) ) * lightColor.a;
normalize( -eyeRay ) ) * lightBrightness * atten * shadowed;
float Sat_NL_Att = saturate( nDotL * atten * shadowed ) * lightBrightness;
float3 lightColorOut = lightMapParams.rgb * lightColor.rgb;

View file

@ -141,7 +141,7 @@ float4 main( ConvexConnectP IN,
// Specular term
float specular = AL_CalcSpecular( -lightToPxlVec,
normal,
normalize( -eyeRay ) ) * lightColor.a;
normalize( -eyeRay ) ) * lightBrightness * atten * shadowed;
float Sat_NL_Att = saturate( nDotL * atten * shadowed ) * lightBrightness;
float3 lightColorOut = lightMapParams.rgb * lightColor.rgb;

View file

@ -198,7 +198,7 @@ float4 main( FarFrustumQuadConnectP IN,
// Specular term
float specular = AL_CalcSpecular( -lightDirection,
normal,
normalize(-IN.vsEyeRay) ) * lightColor.a;
normalize(-IN.vsEyeRay) ) * lightBrightness * shadowed;
float Sat_NL_Att = saturate( dotNL * shadowed ) * lightBrightness;
float3 lightColorOut = lightMapParams.rgb * lightColor.rgb;