Skip to content

Commit e003e01

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 1f328c4 commit e003e01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/engine/renderer/tr_shader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4620,6 +4620,7 @@ static bool ParseShader( const char *_text )
46204620
continue;
46214621
}
46224622
// fogGradient
4623+
// Default: fogGradient expFalloff 5
46234624
else if ( !Q_stricmp( token, "fogGradient" ) )
46244625
{
46254626
token = COM_ParseExt2( text, false );
@@ -6007,7 +6008,7 @@ static shader_t *FinishShader()
60076008

60086009
if ( shader.fogParms.falloffExp == 0.0f )
60096010
{
6010-
shader.fogParms.falloffExp = 9999;
6011+
shader.fogParms.falloffExp = M_LN2 / 5;
60116012
}
60126013

60136014
numStages = MAX_SHADER_STAGES;

0 commit comments

Comments
 (0)