Skip to content

Commit 1ad917e

Browse files
committed
Don't store alpha channel for lightGrid2 image
Set the alpha byte to 255 so the image uploading code will choose an RGB format.
1 parent 6ed75ce commit 1ad917e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/engine/renderer/tr_bsp.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3446,7 +3446,7 @@ static void R_SetConstantColorLightGrid( const byte color[3] )
34463446
gridPoint2->direction[ 0 ] = floatToSnorm8(0.0f);
34473447
gridPoint2->direction[ 1 ] = floatToSnorm8(0.0f);
34483448
gridPoint2->direction[ 2 ] = floatToSnorm8(1.0f);
3449-
gridPoint2->unused = 0;
3449+
gridPoint2->unused = 255;
34503450

34513451
w->lightGridData1 = gridPoint1;
34523452
w->lightGridData2 = gridPoint2;
@@ -3644,7 +3644,7 @@ void R_LoadLightGrid( lump_t *l )
36443644
gridPoint2->direction[0] = 128 + floatToSnorm8( direction[ 0 ] );
36453645
gridPoint2->direction[1] = 128 + floatToSnorm8( direction[ 1 ] );
36463646
gridPoint2->direction[2] = 128 + floatToSnorm8( direction[ 2 ] );
3647-
gridPoint2->unused = 0;
3647+
gridPoint2->unused = 255;
36483648
}
36493649

36503650
// fill in gridpoints with zero light (samples in walls) to avoid
@@ -3691,7 +3691,6 @@ void R_LoadLightGrid( lump_t *l )
36913691
gridPoint2->direction[0] = 128 + floatToSnorm8(direction[0]);
36923692
gridPoint2->direction[1] = 128 + floatToSnorm8(direction[1]);
36933693
gridPoint2->direction[2] = 128 + floatToSnorm8(direction[2]);
3694-
gridPoint2->unused = 0;
36953694
}
36963695
}
36973696
}

0 commit comments

Comments
 (0)