mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Corrects the specular handling as per Richard's suggestion in #1783
This commit is contained in:
parent
00a4a21e3f
commit
97ac826e44
|
|
@ -356,7 +356,7 @@ void main()
|
|||
// Get some specular reflection.
|
||||
vec3 newbump = bumpNorm;
|
||||
newbump.xy *= 3.5;
|
||||
newbump = normalize( bumpNorm );
|
||||
newbump = normalize( newbump );
|
||||
vec3 halfAng = normalize( eyeVec + -lightVec );
|
||||
float specular = saturate( dot( newbump, halfAng ) );
|
||||
specular = pow( specular, SPEC_POWER );
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0
|
|||
// Get some specular reflection.
|
||||
float3 newbump = bumpNorm;
|
||||
newbump.xy *= 3.5;
|
||||
newbump = normalize( bumpNorm );
|
||||
newbump = normalize( newbump );
|
||||
float3 halfAng = normalize( eyeVec + -lightVec );
|
||||
float specular = saturate( dot( newbump, halfAng ) );
|
||||
specular = pow( specular, SPEC_POWER );
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ void main()
|
|||
// Get some specular reflection.
|
||||
vec3 newbump = bumpNorm;
|
||||
newbump.xy *= 3.5;
|
||||
newbump = normalize( bumpNorm );
|
||||
newbump = normalize( newbump );
|
||||
vec3 halfAng = normalize( eyeVec + -lightVec );
|
||||
float specular = saturate( dot( newbump, halfAng ) );
|
||||
specular = pow( specular, SPEC_POWER );
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0
|
|||
// Get some specular reflection.
|
||||
float3 newbump = bumpNorm;
|
||||
newbump.xy *= 3.5;
|
||||
newbump = normalize( bumpNorm );
|
||||
newbump = normalize( newbump );
|
||||
float3 halfAng = normalize( eyeVec + -lightVec );
|
||||
float specular = saturate( dot( newbump, halfAng ) );
|
||||
specular = pow( specular, SPEC_POWER );
|
||||
|
|
|
|||
Loading…
Reference in a new issue