Modulate

From Valve Developer Community
Revision as of 12:21, 28 December 2018 by NvC DmN CH (talk | contribs) (The initial description was misleading, the shader just modulates pixels. How and what you do with it depends on you. Moved it in a tip. (vertex colors is just a SUPER low res (1 pixel covers half a face)) (lightmapping isnt special, just higher res), etc)
Jump to navigation Jump to search

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.

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.
Todo: Test performance more. Probably expensive when many layers are in use.

See also