]> icculus.org git repositories - divverent/darkplaces.git/commit
fix glsl model lighting on unlit maps (normal vector was calculated as (0,0,0) as...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 7 May 2007 18:23:22 +0000 (18:23 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 7 May 2007 18:23:22 +0000 (18:23 +0000)
commit22e8d3384e857accf847d37b3516645a5ce0c058
tree0c1c5ad5876cf032b01cc00a21d0748353b8a254
parent59debfcc7838a0e256033b3fc49d407741b3df58
fix glsl model lighting on unlit maps (normal vector was calculated as (0,0,0) as there was no contribution from the map -> GLSL calls normalize() on that -> (nan,nan,nan), which apparently counts as black).
The fix replaces these zero normal vectors by (0,0,1) (which vector is actually chosen does not matter, as its contribution is scaled by zero anyway).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7248 d7cf8633-e32d-0410-b094-e92efae38249
gl_rmain.c