File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2434,6 +2434,11 @@ void Tess_ComputeColor( shaderStage_t *pStage )
2434
2434
{
2435
2435
rgb = Math::Clamp ( RB_EvalExpression ( &pStage->rgbExp , 1.0 ), 0 .0f , 1 .0f );
2436
2436
2437
+ if ( tr.worldLinearizeTexture )
2438
+ {
2439
+ rgb = convertFromSRGB ( rgb );
2440
+ }
2441
+
2437
2442
tess.svars .color = Color::White * rgb;
2438
2443
break ;
2439
2444
}
@@ -2462,6 +2467,13 @@ void Tess_ComputeColor( shaderStage_t *pStage )
2462
2467
blue = Math::Clamp ( RB_EvalExpression ( &pStage->blueExp , 1.0 ), 0 .0f , 1 .0f );
2463
2468
}
2464
2469
2470
+ if ( tr.worldLinearizeTexture )
2471
+ {
2472
+ red = convertFromSRGB ( red );
2473
+ green = convertFromSRGB ( green );
2474
+ blue = convertFromSRGB ( blue );
2475
+ }
2476
+
2465
2477
tess.svars .color .SetRed ( red );
2466
2478
tess.svars .color .SetGreen ( green );
2467
2479
tess.svars .color .SetBlue ( blue );
You can’t perform that action at this time.
0 commit comments