// vim:ts=4:sw=4:cindent fogs/real_fog { noShadows blendLight description "A blend light instead of a foglight. Works best when covering the entire map and bound to the player, but can also look better (no artefacts) than real foglights. Does not fog any postprocess surface, like water or sky. These need to be colored sep. to match the fog color, either by using custom materials on them, or by putting a patch over them with textures/darkmod/fogs/real_fog_layer_moving on it." qer_editorimage textures/fog/realfog { blend add //map textures/fog/realfog_thinner map textures/common/nodraw //suppress console warning. The actual image has been missing for years, so mappers have been using the material without an image all this time anyway zeroclamp // make sure it doesn't bleed over the edges } } // Tels 2010-09-23 fogs/real_fog_moving { description "A blend light instead of a foglight. Works best when covering the entire map and bound to the player, but can also look better (no artefacts) than real foglights. Does not fog any postprocess surface, like water or sky. These need to be colored sep. to match the fog color, either by using custom materials on them, or by putting a patch over them with textures/darkmod/fogs/real_fog_layer_moving on it." noShadows blendLight { blend add map textures/fog/realfog zeroclamp // make sure it doesn't bleed over the edges } { blend add map textures/lights/clouds.tga scroll time * (parm5 + 1) * 0.008, 0 } } // Tels 2010-09-23 fogs/real_fog_thin_moving { description "Thin version of real_fog_moving, usable for swamp areas. Set 'shaderParm5' to set the moving speed, values around 1 look good. Set 'shaderParm6' to control the density, values from 0 to 0.90. A blend light instead of a foglight. Works best when covering the entire map and bound to the player, but can also look better (no artefacts) than real foglights. Does not fog any postprocess surface, like water or sky. These need to be colored sep. to match the fog color, either by using custom materials on them, or by putting a patch over them with textures/darkmod/fogs/real_fog_layer_moving on it." noShadows blendLight { blend add map textures/fog/realfog_thin rgb 0.01 + parm6 // thin it out zeroclamp // make sure it doesn't bleed over the edges } { blend add map textures/lights/clouds.tga rgb 0.4 + parm6 / 2 // thin it out scroll time * parm5 * 0.008, 0 } } // Tels 2010-09-23 textures/darkmod/fogs/real_fog_layer_moving { description "Apply to a thin patch to get a moving layer of fog. Set 'shaderParm5' on the entity to set the moving speed, values around 1 look good." noShadows translucent twosided { blend add map textures/fog/realfog_thin rgb 0.05 + parm6 // thin it out zeroclamp // make sure it doesn't bleed over the edges } { blend add map textures/lights/clouds.tga scroll time * parm5 * 0.008, 0 rgb 0.5 + parm6 / 2 // thin it out zeroclamp // make sure it doesn't bleed over the edges } } fogs/basicFog { noShadows fogLight // tell the engine it is fog and not a light { map _fog // the internal fog image colored // take RGBA from entity shaderparms } } fogs/glare { description "Glare SFX fog light" blendLight noShadows lightFalloffImage lights/squarelight1a { blend add // add on top of alpha blend on surfaces map lights/squarelight1 zeroclamp // make sure it doesn't bleed over the edges colored // take RGBA from entity shaderparms } } fogs/glare2 { description "Glare SFX fog light" blendLight noShadows lightFalloffImage lights/squarelight1a { blend add // add on top of alpha blend on surfaces map lights/spot01 zeroclamp // make sure it doesn't bleed over the edges colored // take RGBA from entity shaderparms } } tdm_fogs/cloud_fog { description "Cloudy foglight, which can be colored." fogLight // tell the engine it is fog and not a light noShadows { map lights/spot01 colored // take rgba from entity shaderparms } } // legacy fog material fogs/delta1_fog { fogLight noShadows { map _fog alpha 0.5 colored } } fogs/lava_fog { noShadows blendLight { blend add map textures/fog/lavafog zeroclamp // make sure it doesn't bleed over the edges } } ////////////////Usage////////////////////// /* // sets up the fog for this level - make a map script with this in it. -- Dram // created from an example on www.doom3world.org void setup_objects() { entity foglight; $foglight = sys.spawn( "light" ); $foglight.setShader( "fogs/lava_fog" ); $foglight.setRadius( 15850 ); $foglight.bindPosition( $player1 ); $foglight.setOrigin( '0 0 0' ); } // function that executes when script is loaded void main () { setup_objects (); sys.print( "Fog created!\n" ); } */ fogs/pitFog_to_black { lightFalloffImage lights/xfalloff.tga fogLight // tell the engine it is fog and not a light noShadows { map _fog // the internal fog image colored // take rgba from entity shaderparms } }