]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
add missing dimension to dirSample
authorrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Tue, 30 Sep 2008 12:13:10 +0000 (12:13 +0000)
committerrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Tue, 30 Sep 2008 12:13:10 +0000 (12:13 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@108 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/lightmaps_ydnar.c

index 0bffc9db1c79e37b467966ca8d87dea7b437531c..cbcd1128a8ca973fe8d9eae0f4378110bee34943 100644 (file)
@@ -2145,7 +2145,7 @@ static void FindOutLightmaps( rawLightmap_t *lm )
                                }
                                else
                                        VectorCopy( luxel, color );
-                               
+
                                /* styles are not affected by minlight */
                                if( lightmapNum == 0 )
                                {
@@ -2167,6 +2167,7 @@ static void FindOutLightmaps( rawLightmap_t *lm )
                                
                                /* store color */
                                pixel = olm->bspLightBytes + (((oy * olm->customWidth) + ox) * 3);
+
                                if(deluxemap)
                                        ColorToBytesDeluxe( color, pixel, lm->brightness, deluxel, olm->bspDirBytes + (((oy * olm->customWidth) + ox) * 3));
                                else
@@ -2238,7 +2239,8 @@ void StoreSurfaceLightmaps( void )
        int                                     i, j, k, x, y, lx, ly, sx, sy, *cluster, mappedSamples;
        int                                     style, size, lightmapNum, lightmapNum2;
        float                           *normal, *luxel, *bspLuxel, *bspLuxel2, *radLuxel, samples, occludedSamples;
-       vec3_t                          sample, occludedSample, dirSample, colorMins, colorMaxs;
+       vec3_t                          sample, occludedSample, colorMins, colorMaxs;
+       vec_t               dirSample[4];
        float                           *deluxel, *bspDeluxel, *bspDeluxel2;
        byte                            *lb;
        int                                     numUsed, numTwins, numTwinLuxels, numStored;
@@ -2444,7 +2446,7 @@ void StoreSurfaceLightmaps( void )
                                        /* get luxels */
                                        luxel = SUPER_LUXEL( lightmapNum, x, y );
                                        deluxel = SUPER_DELUXEL( x, y );
-                                       
+
                                        /* copy light direction */
                                        if( deluxemap && lightmapNum == 0 )
                                        {
@@ -2513,7 +2515,7 @@ void StoreSurfaceLightmaps( void )
                                                        }
                                                }
                                        }
-                                       
+
                                        /* scale the sample */
                                        VectorScale( sample, (1.0f / samples), sample );