UnlitTwoTexture: Difference between revisions
ShiroDkxtro2 (talk | contribs) (Basic documentation of SOME Parameters) |
ShiroDkxtro2 (talk | contribs) (Additional Information, $basetexturetransform, $frame, $color, $color2, works on brushes and models) |
||
Line 1: | Line 1: | ||
* Two base textures are multiplied together and can be [[Material proxies|transformed]] independently. (Just like the [http://en.wikipedia.org/wiki/Blend_modes#Multiply Multiply] blending mode in typical image editors.) | * Two base textures are multiplied together and can be [[Material proxies|transformed]] independently. (Just like the [http://en.wikipedia.org/wiki/Blend_modes#Multiply Multiply] blending mode in typical image editors.) | ||
* Unrelated to [[WorldVertexTransition]], which is used for making alpha fading transitions between two base textures on displacements. | * Unrelated to [[WorldVertexTransition]], which is used for making alpha fading transitions between two base textures on displacements.<br> | ||
{{ | <br> | ||
{{note|This Shader works on both Brushes and Models}} | |||
{{confirm| Do models require {{ent|$model}} in branches before {{csgo}}?}} | |||
[[Category:Shaders]] | [[Category:Shaders]] | ||
== Parameters == | == Parameters == | ||
{{ | {{MatParam|$basetexture|texture|}} | ||
The first Texture that is used, how it is used depends on the effects which are enabled. | |||
By default <code>$basetexture</code> will be multiplied with <code>$texture2</code>.<br> | |||
{{MatParam|$frame|int|The frame to start an animated <code>$texture2</code> on.}} | |||
{{MatParam|$basetexturetransform|matrix|Transforms the texture before use in the material. {{VMT UVtransform}} }} | |||
<br> | |||
{{MatParam|$texture2|texture|}} | {{MatParam|$texture2|texture|}} | ||
Second Texture that is used in different ways depending on which effects are used.<br> | Second Texture that is used in different ways depending on which effects are used.<br> | ||
By default <code>$basetexture</code> will be multiplied with <code>$texture2</code>.<br> | By default <code>$basetexture</code> will be multiplied with <code>$texture2</code>.<br> | ||
{{note|First texture is applied via {{ent|$basetexture}}.}}< | {{note|First texture is applied via {{ent|$basetexture}}.}} | ||
{{MatParam|$frame2|int|The frame to start an animated <code>$texture2</code> on.}} | |||
{{MatParam|$texture2transform|matrix|Transforms the texture before use in the material. {{VMT UVtransform}} }} | {{MatParam|$texture2transform|matrix|Transforms the texture before use in the material. {{VMT UVtransform}} }} | ||
{{MatParam|$ | <br> | ||
{{MatParam|$color|RGB matrix|tints the result, on brushes.}} | |||
{{MatParam|$color2|RGB matrix|tints the result, on models.}} | |||
<br> | <br> | ||
{{MatParam|$beachfoam|bool|Introduced with Dangerzone, adds animated wave-like effects using a special texture|only={{csgo}}}} | {{MatParam|$beachfoam|bool|Introduced with Dangerzone, adds animated wave-like effects using a special texture|only={{csgo}}}} |
Revision as of 11:24, 16 February 2023
- Two base textures are multiplied together and can be transformed independently. (Just like the Multiply blending mode in typical image editors.)
- Unrelated to WorldVertexTransition, which is used for making alpha fading transitions between two base textures on displacements.



Parameters
$basetexture
The first Texture that is used, how it is used depends on the effects which are enabled.
By default $basetexture
will be multiplied with $texture2
.
$frame
$basetexturetransform
$texture2
Second Texture that is used in different ways depending on which effects are used.
By default $basetexture
will be multiplied with $texture2
.

$frame2
$texture2transform
$color
$color2
$beachfoam

On the Dangerzone Wave Model, both $texture2
and $basetexture
use the 'Beachwaves' Texture.
The 'Beachwaves' Texture uses the RGB channels for different purposes.
- Red Channel : Waves Albedo Texture
- Green Channel : Distortion/Noise for the Red Channel
- Blue Channel : Distortion/Noise for the Red Channel
$CrosshairMode
$texture2
is used for a framebuffer texture.
The result will be blended between Crosshair Texture + CrosshairTint
and Crosshair Texture * CrosshairTint
using Average Luminance of $texture2 * $CrosshairColorAdapt
$CrosshairTint
$CrosshairColorAdapt
E.G.
Stock .vmt hl2/materials/models/props_combine/portalball001_sheet.vmt
"UnlitTwoTexture"
{
"$basetexture" "models/props_combine/portalball001_sheet"
"$texture2" "models/props_combine/portalball001b_sheet"
"$model" 1
"$nocull" "1"
"$additive" "1"
"Proxies"
{
"TextureScroll"
{
"texturescrollvar" "$texture2transform"
"texturescrollrate" -.2
"texturescrollangle" 60
}
}
}
models/props/hr_massive/beachwaves/beachwaves.vmt
UnlitTwoTexture
{
"$beachfoam" "1"
"$basetexture" "models/props/hr_massive/beachwaves/beachwaves"
"$texture2" "models/props/hr_massive/beachwaves/beachwaves"
"$additive" "1"
}