Skip to content

Commit e2112fd

Browse files
committed
For fogs use a small gradient by default
Make the default gradient like `fogGradient expFalloff 5`. This makes the fogs have softer edges without changing the appearance too much.
1 parent a4124eb commit e2112fd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/engine/renderer/tr_shader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4637,6 +4637,7 @@ static bool ParseShader( const char *_text )
46374637
continue;
46384638
}
46394639
// fogGradient
4640+
// Default: fogGradient expFalloff 5
46404641
else if ( !Q_stricmp( token, "fogGradient" ) )
46414642
{
46424643
token = COM_ParseExt2( text, false );
@@ -6024,7 +6025,7 @@ static shader_t *FinishShader()
60246025

60256026
if ( shader.fogParms.falloffExp == 0.0f )
60266027
{
6027-
shader.fogParms.falloffExp = 9999;
6028+
shader.fogParms.falloffExp = M_LN2 / 5;
60286029
}
60296030

60306031
numStages = MAX_SHADER_STAGES;

0 commit comments

Comments
 (0)