r8535 - trunk/darkplaces

divverent at icculus.org divverent at icculus.org
Mon Oct 20 09:20:06 EDT 2008


Author: divverent
Date: 2008-10-20 09:20:06 -0400 (Mon, 20 Oct 2008)
New Revision: 8535

Modified:
   trunk/darkplaces/gl_rmain.c
Log is attached.
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.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 20081020.132006.diff
URL: <http://icculus.org/pipermail/twilight-commits/attachments/20081020/ee22396f/attachment.diff>


More information about the twilight-commits mailing list