Skip to content

Commit

Permalink
consider nodraw shaders in fog direction deduction
Browse files Browse the repository at this point in the history
  • Loading branch information
Garux committed Oct 30, 2022
1 parent f53bfde commit 8565682
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/shaderManual/general-directives.html
Expand Up @@ -152,7 +152,7 @@ <h2 id="fogParms">fogParms ( r g b ) opacity</h2>
<p>Fog volume brushes must obey the following rules:</p>
<ul>
<li>The fog volume can only have one surface visible (from outside the fog).</li>
<li>Fog must be made of one brush. It cannot be made of adjacent brushes.</li>
<li>Normally fog must be made of one brush. It can be made of adjacent brushes with nodraw shader on junctions, however each brush takes ingame fog slot, count of which is limited, e.g. 31 in Q3A.</li>
</ul>
<blockquote>
<h4>Design Notes:</h4>
Expand Down
4 changes: 2 additions & 2 deletions tools/quake3/q3map2/writebsp.cpp
Expand Up @@ -440,7 +440,7 @@ void EmitFogs(){
/* find visible axial side */
for ( size_t j = 6; j-- > 0; ) // prioritize +Z (index 5) then -Z (index 4) in ambiguous case; fogged pit is assumed as most likely case
{
if ( !fog.brush->sides[ j ].visibleHull.empty() ) {
if ( !fog.brush->sides[ j ].visibleHull.empty() && !( fog.brush->sides[ j ].compileFlags & C_NODRAW ) ) {
Sys_Printf( "Fog %zu has visible side %zu\n", i, j );
bspFog.visibleSide = j;
break;
Expand All @@ -450,7 +450,7 @@ void EmitFogs(){
if( bspFog.visibleSide < 0 ){
for ( size_t j = 6; j < fog.brush->sides.size(); ++j )
{
if ( !fog.brush->sides[ j ].visibleHull.empty() ) {
if ( !fog.brush->sides[ j ].visibleHull.empty() && !( fog.brush->sides[ j ].compileFlags & C_NODRAW ) ) {
Sys_Printf( "Fog %zu has visible side %zu\n", i, j );
bspFog.visibleSide = j;
break;
Expand Down

0 comments on commit 8565682

Please sign in to comment.