Jump to content

Home

Viewing Distance in MP


Amakusa

Recommended Posts

Example fog shader:

 

textures/skies/examplefog

{

qer_editorimage textures/fogs/fog1.tga

 

surfaceparm nodraw

surfaceparm nonsolid

surfaceparm trans

surfaceparm fog

 

fogparms ( 0.4 0.4 0.4 ) 8192

}

 

The line surfaceparm fog is what tells the game explicitly that this is a fog.

 

The line fogparms ( 0.4 0.4 0.4 ) 8192 is what does the real work in the fog shader. The numbers in parentheses are the RGB color values of the fog. The last number is the maximum distance (in game units) that players can see before the fog totally obscures their vision.

 

You can also map textures onto the surface of the fog to achieve an effect like the surface of water shaders. Look at one of the bespin fogs to see this done.

 

If you have this fog in your entire level, you can add the key/value distancecull 8192 to your worldspawn and nothing beyond the cutoff distance will be drawn in-game, saving your processor a little. For more on this, see the q3map2 foghull guide.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...