diff options
author | taw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5> | 2008-07-27 09:12:47 +0000 |
---|---|---|
committer | taw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5> | 2008-07-27 09:12:47 +0000 |
commit | d0baf3fa947d01a9a9223cb9fd3989e1a701d899 (patch) | |
tree | 7d8d5e412f635d926678fec790802ea0e0f8ef16 /data | |
parent | 993527e08664cbf457d945921cd76bb2a92143fe (diff) |
Emissive textures don't reflect light
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@180 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'data')
-rw-r--r-- | data/shaders/lighting.frag | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/data/shaders/lighting.frag b/data/shaders/lighting.frag index 0b11b36..1bc0afd 100644 --- a/data/shaders/lighting.frag +++ b/data/shaders/lighting.frag @@ -88,10 +88,7 @@ void main() { vec3 tex = texture2D(texture, gl_TexCoord[0].st).rgb; if ( texture_emits ) { - gl_FragColor = vec4(min(emit.r + ambi.r + diff.r + spec.r + tex.r, 1.0), - min(emit.g + ambi.g + diff.g + spec.g + tex.g, 1.0), - min(emit.b + ambi.b + diff.b + spec.b + tex.b, 1.0), - alpha); + gl_FragColor = vec4(tex.r, tex.g, tex.b, alpha); } else { gl_FragColor = vec4(min(tex.r * (ambi.r + diff.r) + spec.r, 1.0), min(tex.g * (ambi.g + diff.g) + spec.g, 1.0), |