Skip to content

Commit 9ae20b9

Browse files
committed
linearizedynlight
1 parent b8edf78 commit 9ae20b9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/engine/renderer/tr_scene.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,14 @@ void RE_AddDynamicLightToSceneET( const vec3_t org, float radius, float intensit
429429
light->l.color[ 1 ] = g;
430430
light->l.color[ 2 ] = b;
431431

432+
// Linearize dynamic lights.
433+
if ( tr.worldLinearizeTexture )
434+
{
435+
light->l.color[ 0 ] = convertFromSRGB( light->l.color[ 0 ] );
436+
light->l.color[ 1 ] = convertFromSRGB( light->l.color[ 1 ] );
437+
light->l.color[ 2 ] = convertFromSRGB( light->l.color[ 2 ] );
438+
}
439+
432440
// Cancel overBright on dynamic lights.
433441
VectorScale( light->l.color, tr.mapInverseLightFactor, light->l.color );
434442

0 commit comments

Comments
 (0)