Cloud: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Full Documentation of the Cloud Shader, based on cloud_dx9.cpp from sdk2013's code)
 
No edit summary
Line 2: Line 2:




'''{{code|Cloud}}''' draws a [[$basetexture]] without lighting, maksed by [[$cloudalphatexture]].<br>
'''{{code|Cloud}}''' draws a [[$basetexture]] without lighting, masked by [[$cloudalphatexture]].<br>
As the name implies its used for rendering Clouds.<br>
As the name implies its used for rendering Clouds.<br>
It does this by multiplying [[$basetexture]] with [[$cloudalphatexture]], including Alpha.<br>
It does this by multiplying [[$basetexture]] with [[$cloudalphatexture]], including Alpha.<br>

Revision as of 15:12, 6 May 2025

English (en)Translate (Translate)


Cloud draws a $basetexture without lighting, masked by $cloudalphatexture.
As the name implies its used for rendering Clouds.
It does this by multiplying $basetexture with $cloudalphatexture, including Alpha.
This works similar to $detail's $detailblendmode 8, except the Alpha is also multiplied.
Unlike other Shaders, the RGB Values are not affected by Fog. The Alpha IS however!
By default, this Shader uses Alpha Blending ( $translucent ).
Using $additive, this can be reconfigured to draw additively instead.

Todo: The $cloudalphatexture uses a second Texture Coordinate.

Either this Shader is supposed to be used on Brushes ( utilising the Lightmap Coordinates somehow ),

or it's supposed to be used on planes created via the MeshBuilder.

Supported Parameters

$basetexture $frame $cloudalphatexture $cloudscale $maskscale $additive