Skip to content

Commit af3e2f5

Browse files
committed
fix
1 parent 79ee7c8 commit af3e2f5

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

src/engine/renderer/tr_bsp.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,6 @@ static void R_LinearizeLightingColorBytes( byte* bytes )
5151
convertFromSRGB( bytes );
5252
}
5353

54-
static void R_LinearizeLightingColor( Color::Color lightColor )
55-
{
56-
if ( !tr.worldLinearizeLightMap )
57-
{
58-
return;
59-
}
60-
61-
lightColor = lightColor.ConvertFromSRGB();
62-
}
63-
6454
static bool cannotColorShiftLighting()
6555
{
6656
if ( tr.overbrightBits >= tr.mapOverBrightBits )
@@ -1018,7 +1008,7 @@ static void ParseTriangleSurface( dsurface_t* ds, drawVert_t* verts, bspSurface_
10181008

10191009
cv->verts[ i ].lightColor = Color::Adapt( verts[ i ].color );
10201010

1021-
R_LinearizeLightingColor( cv->verts[ i ].lightColor );
1011+
R_LinearizeLightingColorBytes( cv->verts[ i ].lightColor.ToArray() );
10221012

10231013
R_ColorShiftLightingBytes( cv->verts[ i ].lightColor.ToArray() );
10241014
}
@@ -1252,7 +1242,7 @@ static void ParseMesh( dsurface_t *ds, drawVert_t *verts, bspSurface_t *surf )
12521242

12531243
points[ i ].lightColor = Color::Adapt( verts[ i ].color );
12541244

1255-
R_LinearizeLightingColor( points[ i ].lightColor );
1245+
R_LinearizeLightingColorBytes( points[ i ].lightColor.ToArray() );
12561246

12571247
R_ColorShiftLightingBytes( points[ i ].lightColor.ToArray() );
12581248
}

0 commit comments

Comments
 (0)