mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2025-02-17 01:11:20 +00:00
fixed fog-only shaders being recognized as sky shaders
This commit is contained in:
parent
8ee79c7b9e
commit
0087c2bf14
3 changed files with 7 additions and 4 deletions
|
@ -107,6 +107,8 @@ chg: r_fullbright is now latched again
|
|||
|
||||
chg: negative r_swapInterval values will request adaptive v-sync when using an OpenGL back-end
|
||||
|
||||
fix: fog-only non-sky shaders were incorrectly handled as sky shaders, which broke fog on many maps
|
||||
|
||||
fix: r_monitor on Linux is now 0-based and the value doesn't change incorrectly on its own anymore
|
||||
|
||||
fix: when a latched cvar's value is set to its default, the cvar is no longer marked as changed
|
||||
|
|
|
@ -383,6 +383,7 @@ struct shader_t {
|
|||
|
||||
qbool entityMergable; // multiple refentities can be combined in one batch (smoke, blood)
|
||||
|
||||
qbool isSky;
|
||||
skyParms_t sky;
|
||||
fogParms_t fogParms;
|
||||
|
||||
|
|
|
@ -1151,6 +1151,7 @@ static void ParseSkyParms( const char** text )
|
|||
}
|
||||
|
||||
shader.sort = SS_ENVIRONMENT;
|
||||
shader.isSky = qtrue;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1443,7 +1444,7 @@ static qbool ParseShader( const char** text )
|
|||
//
|
||||
// ignore shaders that don't have any stages, unless it is a sky or fog
|
||||
//
|
||||
if ( !s && (shader.sort != SS_ENVIRONMENT) && !(shader.contentFlags & CONTENTS_FOG) ) {
|
||||
if ( s == 0 && !shader.isSky && !(shader.contentFlags & CONTENTS_FOG ) ) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
@ -2176,9 +2177,8 @@ static shader_t* FinishShader()
|
|||
}
|
||||
*/
|
||||
|
||||
// fogonly shaders don't have any normal passes
|
||||
// !!! nor does sky, and this is utterly retarded logic in the first place
|
||||
if ( !stage && (shader.sort == SS_BAD) ) {
|
||||
// non-sky fog-only shaders don't have any normal passes
|
||||
if ( !shader.isSky && stage == 0 ) {
|
||||
shader.sort = SS_FOG;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue