]> icculus.org git repositories - divverent/darkplaces.git/commit
q3map2 is too stupid to calculate proper surface normals when q3map_nonplanar is...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Oct 2008 13:20:06 +0000 (13:20 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Oct 2008 13:20:06 +0000 (13:20 +0000)
commit56fd91b04f13a1dc31e36113683dda6a72795632
tree538e4071861006c53340b63a1642b7a0352e21cf
parent59d6db818e99a32b37d922d46e8c598f8dc7f8c0
q3map2 is too stupid to calculate proper surface normals when q3map_nonplanar is used (the lightmap and deluxemap coords correspond to virtually random coordinates on that luxel, and NOT to its center, because recursive triangle subdivision is used to map the luxels to coordinates on the draw surfaces), which also causes deluxemaps to be wrong because light contributions from the wrong side of the surface are added up. To prevent divisions by zero or strong exaggerations, a max() nudge is done here at expense of some additional fps. This is ONLY needed for deluxemaps, tangentspace deluxemap avoid this problem by design.

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