Merge pull request #1822 from Areloch/sparklingwaterfix

Corrects the specular handling as per Richard's suggestion in #1783
This commit is contained in:
Areloch 2016-11-22 08:34:06 -06:00 committed by GitHub
commit cfb88b27e7
4 changed files with 4 additions and 4 deletions

View file

@ -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 );

View file

@ -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 );

View file

@ -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 );

View file

@ -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 );