Modulate: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(US English is used on this wiki, the interpolation trick you mentioned is not suitable because the Modulate shader suffers color banding (see for yourself in-game), baking the entire gradient bypasses this)
No edit summary
Line 6: Line 6:
==Description==
==Description==
Accepts only a <code>$basetexture</code> and this texture will be used to modulate pixels. Multiplies the color behind it with this surface's texture.
Accepts only a <code>$basetexture</code> and this texture will be used to modulate pixels. Multiplies the color behind it with this surface's texture.
Also accepts {{ent|$no_draw}}.


{{tip|This can be effectively used to fake various features that [[Source]] may not support, such as vertex coloring or [[lightmap]]ping on models, by creating a surface above the first one to modulate it.}}
{{tip|This can be effectively used to fake various features that [[Source]] may not support, such as vertex coloring or [[lightmap]]ping on models, by creating a surface above the first one to modulate it.}}

Revision as of 16:45, 28 December 2018

Stub

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

Modulate is a shader that modulates the colors of any pixels behind 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. Also accepts $no_draw.

Tip.pngTip:This can be effectively used to fake various features that Source may not support, such as vertex coloring or lightmapping on models, by creating a surface above the first one to modulate it.
Warning.pngWarning:Expensive if multiple are used together.

See also