Rembrandt: Normalize normals before outputing them to gbuffer
This commit is contained in:
parent
ec715cba3d
commit
ceb1cb102b
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ void main() {
|
|||
float shininess = gl_FrontMaterial.shininess;
|
||||
float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb, vec3( 0.3, 0.59, 0.11 ) );
|
||||
|
||||
vec3 normal2 = (2.0 * gl_Color.a - 1.0) * ecNormal;
|
||||
vec3 normal2 = normalize( (2.0 * gl_Color.a - 1.0) * ecNormal );
|
||||
gl_FragData[0] = vec4( (normal2.xy + vec2(1.0,1.0)) * 0.5, 0.0, 1.0 );
|
||||
gl_FragData[1] = vec4( gl_Color.rgb * texel.rgb, float( materialID ) / 255.0 );
|
||||
gl_FragData[2] = vec4( specular, shininess / 255.0, emission, 1.0 );
|
||||
|
|
Loading…
Reference in a new issue