]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
deluxe: always use a MINIMUM light contribution from ambient
authorrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 12 Oct 2008 13:44:03 +0000 (13:44 +0000)
committerrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 12 Oct 2008 13:44:03 +0000 (13:44 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@117 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/light_ydnar.c

index 801ef5ac240c681afa7f8c173948314bcc4e5577..7d288b21c56a1dc66394a599d84759f94a8add41 100644 (file)
@@ -2010,6 +2010,9 @@ void IlluminateRawLightmap( int rawLightmapNum )
                                        {
                                                brightness = ambientColor[ 0 ] * 0.3f + ambientColor[ 1 ] * 0.59f + ambientColor[ 2 ] * 0.11f;
                                                brightness *= (1.0 / 255.0);
+                                               // use AT LEAST this amount of contribution from ambient for the deluxemap, fixes points that receive ZERO light
+                                               if(brightness < 0.00390625f)
+                                                       brightness = 0.00390625f;
                                                VectorScale( normal, brightness, deluxel );
                                        }
                                        luxel[ 3 ] = 1.0f;