This article's documentation is for anything that uses the Source engine. Click here for more information.

$desaturatewithbasealpha: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Basic documentation)
 
m (Replacing with "This is a" template)
 
(17 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{source topicon}}
{{LanguageBar|title = $desaturatewithbasealpha}}


{{shaderparam|$desaturatewithbasealpha|since=Alien Swarm|shader1=VertexLitGeneric}}<br>
{{Underlinked|date=January 2024}}
{{Source topicon}}
 
{{This is a|shader parameter|name=$desaturatewithbasealpha|shader=VertexLitGeneric|since=Alien Swarm}}<br>
Setting it to a value above <code>0</code> will enable the behavior.<br>
Setting it to a value above <code>0</code> will enable the behavior.<br>
If used, the {{ent|$basetexture}}'s Alpha channel will be used as a mask to de-saturate the {{ent|$basetexture}}'s Color.<br>
If used, the {{Ent|$basetexture}}'s Alpha channel will be used as a mask to de-saturate the {{Ent|$basetexture}}'s Color.<br>
The amount of desaturation is determined through the same parameter. <code>1.0</code> will result in 100%, and <code>0.5</code> in 50% desaturation.<br>
The amount of desaturation is determined through the same parameter. <code>1.0</code> will result in 100%, and <code>0.5</code> in 50% desaturation.<br>
{{todo|Is this available since {{l4d}}?}}
{{Todo|Is this available since {{l4d}}?}}
{{note|Also available for use in {{src13sp}} and {{src13mp}} through {{lUX|4}}}}
{{Note|Also available for use in {{src13sp}} and {{src13mp}} through {{lUX|4}}}}


== Caveats ==
== Caveats ==
{{Bug|}}
{{Bug|This Parameter does not work with
* Does not work with {{ent|$seamless_base}}{{LUX|addtext=this works|in}}
* {{Ent|$seamless_base}}. {{LUX|in}}
* Does not work with {{ent|$detail}}{{LUX|addtext=this works|in}}
* {{Ent|$detail}}. {{LUX|in}}
* Does not work with {{ent|$bumpmap}} or any parameters that requires a {{ent|$bumpmap}}. Including {{ent|$lightwarptexture}}.{{LUX|addtext=these work. Except {{ent|$phong}}|in}}
* {{Ent|$bumpmap}} or any parameters that requires a {{Ent|$bumpmap}}. Including {{Ent|$lightwarptexture}}. {{LUX|in}}
* Does not work with {{ent|$selfillum}} and thus [[Glowing_Textures#.24selfillum|$selfillummask]].{{LUX|addtext=this works|in}}
* {{Ent|$selfillum}} and thus [[Glowing_Textures#.24selfillum|$selfillummask]] {{LUX|in}}
* Does not work with {{ent|$selfillum_envmapmask_alpha}}{{LUX|addtext=this works|in}}
* {{Ent|$selfillum_envmapmask_alpha}}. {{LUX|in}}
* Does not work with {{ent|$basealphaenvmapmask}}{{LUX|addtext=this works|in}}
* {{Ent|$basealphaenvmapmask}}. {{LUX|in}}}}
{{ModernWarning|Using the Basetexture's Alpha channel for other effects at the same time, might result in expected behaviour!}}
{{warning|Using the Basetexture's Alpha channel for other effects at the same time might result in unexpected behavior!}}

Latest revision as of 10:19, 10 August 2024

English (en)Translate (Translate)
Underlinked - Logo.png
This article needs more Wikipedia icon links to other articles to help Wikipedia icon integrate it into the encyclopedia. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024

$desaturatewithbasealpha is a material shader parameter for the VertexLitGeneric shader available in all Source Source games since Alien Swarm Alien Swarm.
Setting it to a value above 0 will enable the behavior.
If used, the $basetexture's Alpha channel will be used as a mask to de-saturate the $basetexture's Color.
The amount of desaturation is determined through the same parameter. 1.0 will result in 100%, and 0.5 in 50% desaturation.

Todo: Is this available since Left 4 Dead?
Note.pngNote:Also available for use in Source 2013 Singleplayer and Source 2013 Multiplayer through LUX LUX

Caveats

Icon-Bug.pngBug:This Parameter does not work with
Warning.pngWarning:Using the Basetexture's Alpha channel for other effects at the same time might result in unexpected behavior!