Merge pull request #1762 from Azaezel/specularOrderOfOperations

lightbuffer (aka brightness and shadow) always comes last as a mul
This commit is contained in:
Anis 2016-09-17 21:30:02 +02:00 committed by GitHub
commit a1983af225
2 changed files with 2 additions and 2 deletions

View file

@ -47,8 +47,8 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
colorBuffer *= (1.0 - colorBuffer.a); colorBuffer *= (1.0 - colorBuffer.a);
} }
colorBuffer *= float4(lightBuffer.rgb, 1.0);
colorBuffer += float4(specular, specular, specular, 1.0); colorBuffer += float4(specular, specular, specular, 1.0);
colorBuffer *= float4(lightBuffer.rgb, 1.0);
return hdrEncode( float4(colorBuffer.rgb, 1.0) ); return hdrEncode( float4(colorBuffer.rgb, 1.0) );
} }

View file

@ -52,8 +52,8 @@ void main()
colorBuffer *= (1.0 - colorBuffer.a); colorBuffer *= (1.0 - colorBuffer.a);
} }
colorBuffer *= vec4(lightBuffer.rgb, 1.0);
colorBuffer += vec4(specular, specular, specular, 1.0); colorBuffer += vec4(specular, specular, specular, 1.0);
colorBuffer *= vec4(lightBuffer.rgb, 1.0);
OUT_col = hdrEncode( vec4(colorBuffer.rgb, 1.0) ); OUT_col = hdrEncode( vec4(colorBuffer.rgb, 1.0) );
} }