Modulate: Difference between revisions
Jump to navigation
Jump to search
NvC DmN CH (talk | contribs) m (fixed the animation now, it should be in motion as a thumbnail as well now) |
(Re-added forum link until the method to fake vertex coloring/lightmapping with this shader is described (like on the thread)) |
||
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. | ||
For a usage tutorial on how to fake vertex coloring or lightmapping, see this [https://forum.facepunch.com/f/mapping/qypk/The-Official-Facepunch-Mapping-WiP-Thread-v17-Carve-Edition/94/ post here] (halfway through the thread). | |||
{{todo|Test performance more. Probably expensive when many layers are in use.}} | {{todo|Test performance more. Probably expensive when many layers are in use.}} |
Revision as of 07:15, 28 December 2018
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 ), by creating a surface above the first one to modulate it.
Description
Accepts only a $basetexture
and this texture will be used to modulate pixels. Multiplies the color behind it with this surface's texture.
For a usage tutorial on how to fake vertex coloring or lightmapping, see this post here (halfway through the thread).
Todo: Test performance more. Probably expensive when many layers are in use.