Modulate: Difference between revisions
Jump to navigation
Jump to search

Tip:This shader 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.
Note:Does not accept any translucency parameters, including $alpha, $alphatest, $additive and $translucent.
m (→Description) |
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
||
Line 1: | Line 1: | ||
{{Source topicon}} {{lang}} | {{Source topicon}} {{lang}} | ||
[[File:Modulate img.gif|thumb|300px|GIF Animation showing "Modulate" shader in action.]] | [[File:Modulate img.gif|thumb|300px|GIF Animation showing "Modulate" shader in action.]] | ||
{{ | {{this is a|pixel shader|name=Modulate}} It modulates the colors of any pixels behind it. | ||
{{tip|This shader 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 shader 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 19:07, 17 May 2024


Modulate
is a Pixel shader available in all Source games. It modulates the colors of any pixels behind it.

Description
Accepts only the following parameters:
$basetexture "texture" //Multiplies the color behind it with this surface's texture. $mod2x "boolean" //Doubles the modulation, making it appear brighter. 1 enables this, 0 disables. Disabled by default. $nocull "boolean" //Draws triangles from both sides, not just one. 1 enables this, 0 disables. Disabled by default.
