Modulate

From Valve Developer Community
Revision as of 21:40, 27 December 2018 by NvC DmN CH (talk | contribs) (fixed a comma)
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. This can be effectively used to fake various features that Source may not support, such as vertex coloring or lightmapping on models (already possible 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. (Animation hidden in thumbnail, see full size.)

Description

Accepts only a $basetexture and this texture will be used to modulate pixels. Multiplies the color behind it with this surface's texture.

Todo: Test performance more. Probably expensive when many layers are in use.

See also