Fix normal storage into texture data. Input [-1..1] should be output to [0..1]
This commit is contained in:
parent
c4390ae31a
commit
658ece0152
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ void main() {
|
|||
vec4 texel = texture2D(texture, gl_TexCoord[0].st);
|
||||
if (texel.a * color.a < 0.1)
|
||||
discard;
|
||||
gl_FragData[0] = vec4( ecNormal.xy, 0.0, 1.0 );
|
||||
gl_FragData[0] = vec4( (ecNormal.xy + vec2(1.0,1.0)) * 0.5, 0.0, 1.0 );
|
||||
gl_FragData[1] = vec4( color.rgb * texel.rgb, float( materialID ) / 255.0 );
|
||||
gl_FragData[2] = vec4( specular, shininess / 255.0, emission, 1.0 );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue