diff options
Diffstat (limited to 'code/renderer/tr_shader.c')
-rw-r--r-- | code/renderer/tr_shader.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/code/renderer/tr_shader.c b/code/renderer/tr_shader.c index ddcbfca..a489459 100644 --- a/code/renderer/tr_shader.c +++ b/code/renderer/tr_shader.c @@ -3010,6 +3010,17 @@ static void CreateInternalShaders( void ) { static void CreateExternalShaders( void ) { tr.projectionShadowShader = R_FindShader( "projectionShadow", LIGHTMAP_NONE, qtrue ); tr.flareShader = R_FindShader( "flareShader", LIGHTMAP_NONE, qtrue ); + + // Hack to make fogging work correctly on flares. Fog colors are calculated + // in tr_flare.c already. + if(!tr.flareShader->defaultShader) + { + int index; + + for(index = 0; index < tr.flareShader->numUnfoggedPasses; index++) + tr.flareShader->stages[index]->adjustColorsForFog = ACFF_NONE; + } + tr.sunShader = R_FindShader( "sun", LIGHTMAP_NONE, qtrue ); } |