Modulate: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (stub)
(cleared the forum link to the information (as everything is "extracted" here now) + made a gif to present what it really does)
Line 1: Line 1:
{{stub}}
{{stub}}
'''<code>Modulate</code>''' is an shader that modulates the colors of any pixels behind it. This can be effectively used to fake various features that [[Source]] may not support, such as vertex coloring or [[lightmap]]ping on models (except for [[prop_static]] in {{tf2}}).  
 
'''<code>Modulate</code>''' is an shader that modulates the colors of any pixels behind it. This can be effectively used to fake various features that [[Source]] may not support, such as vertex coloring or [[lightmap]]ping on models (except for [[prop_static]] in {{tf2}}), by creating a surface above the first one to modulate it.
 
[[File:Modulate img.gif|thumb|512px|GIF Animation showing "Modulate" shader in action]]
 
== Description ==


Accepts only a <code>$basetexture</code>, and this texture will be used to modulate pixels.
Accepts only a <code>$basetexture</code>, and this texture will be used to modulate pixels.


For a better explanation and usage tutorial, see the [https://forum.facepunch.com/f/mapping/qypk/The-Official-Facepunch-Mapping-WiP-Thread-v17-Carve-Edition/94/ post here] (halfway through the thread).
Multiplies the color behind it with this surface's texture.
 
 
 
 
 
 
 
 
 
 
 
 
{{tip|Probably expensive if need to render many layers of this shader}}
 
{{todo|Test performance.}}
 
 
== See also ==
 
* <code>[[Refract|Refract]]</code>
* <code>[[Water (shader)|Water]]</code>


{{todo|Re-write this page with a better description and explanation of usage}}


[[Category:Shaders]]
[[Category:Shaders]]

Revision as of 21:21, 27 December 2018

Stub

This article or section is a stub. You can help by expanding it.

Modulate is an shader that modulates the colors of any pixels behind it. This can be effectively used to fake various features that Source may not support, such as vertex coloring or lightmapping on models (except for prop_static in Team Fortress 2), by creating a surface above the first one to modulate it.

GIF Animation showing "Modulate" shader in action

Description

Accepts only a $basetexture, and this texture will be used to modulate pixels.

Multiplies the color behind it with this surface's texture.







Tip.pngTip:Probably expensive if need to render many layers of this shader
Todo: Test performance.


See also