mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Blinn-Phong Specular Changes
Based on the work done here: http://www.garagegames.com/community/blogs/view/21032
This commit is contained in:
parent
f5246bb809
commit
17113d3ba5
25 changed files with 167 additions and 26 deletions
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue