Modulate: Difference between revisions
Jump to navigation
Jump to search
Tip: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.
(Re-added forum link until the method to fake vertex coloring/lightmapping with this shader is described (like on the thread)) |
NvC DmN CH (talk | contribs) m (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) |
||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
'''<code>Modulate</code>''' is a shader that modulates the colors of any pixels behind | '''<code>Modulate</code>''' is a shader that modulates the colors of any pixels behind it. | ||
[[File:Modulate img.gif|thumb|512px|GIF Animation showing "Modulate" shader in action.]] | [[File:Modulate img.gif|thumb|512px|GIF Animation showing "Modulate" shader in action.]] | ||
Line 7: | Line 7: | ||
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. | ||
{{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.}} | |||
{{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 12:21, 28 December 2018
Modulate
is a shader that modulates the colors of any pixels behind 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.

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