UnlitTwoTexture: Difference between revisions
Jump to navigation
Jump to search
Confirm:Does this Shader work on brushes?
Note:First texture is applied via $basetexture.
Important:This parameter is intended to be used with $additive.
DeathByNukes (talk | contribs) No edit summary |
ShiroDkxtro2 (talk | contribs) (Basic documentation of SOME Parameters) |
||
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. | ||
{{confirm|Does this Shader work on brushes?}} | |||
[[Category:Shaders]] | [[Category:Shaders]] | ||
== Parameters == | |||
{{todo|Does this Shader work with {{ent|$color}} and/or {{ent|$color2}}?}} | |||
{{MatParam|$texture2|texture|}} | |||
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> | |||
{{note|First texture is applied via {{ent|$basetexture}}.}}<br> | |||
{{MatParam|$texture2transform|matrix|Transforms the texture before use in the material. {{VMT UVtransform}} }} | |||
{{MatParam|$frame2|int|The frame to start an animated <code>$texture2</code> on.}} | |||
<br> | |||
{{MatParam|$beachfoam|bool|Introduced with Dangerzone, adds animated wave-like effects using a special texture|only={{csgo}}}} | |||
{{important|This parameter is intended to be used with {{ent|$additive}}.}} | |||
On the Dangerzone Wave Model, both <code>$texture2</code> and <code>$basetexture</code> use the 'Beachwaves' Texture. | |||
{{todo|Do both Parameters need to use the same Texture?}} | |||
The 'Beachwaves' Texture uses the RGB channels for different purposes. | |||
<small>{{todo|Find a better Name for the Texture...}}</small> | |||
* Red Channel : Waves Albedo Texture | |||
{{todo|Can this be tinted using $color/$color2?}} | |||
* Green Channel : Distortion/Noise for the Red Channel | |||
* Blue Channel : Distortion/Noise for the Red Channel | |||
{{todo|Further documentation required.}} | |||
<br> | |||
<br> | |||
{{MatParam|$CrosshairMode|bool| Enables "Crosshair mode" using <code>$basetexture</code> for the Crosshair|only={{csgo}}}} | |||
<code>$texture2</code> is used for a framebuffer texture.<br> | |||
The result will be blended between <code>Crosshair Texture + CrosshairTint</code> and <code>Crosshair Texture * CrosshairTint</code> using <code>Average Luminance of $texture2 * $CrosshairColorAdapt</code> | |||
{{MatParam|$CrosshairTint|RGB matrix| Tints the <code>$basetexture</code> when using <code>$CrosshairMode</code>|only={{csgo}}}} | |||
{{MatParam|$CrosshairColorAdapt|float|Used for multiplying the average Luminance of <code>$texture2</code> <br>{{note|Default Value <code>"0.4"</code>}}|only={{csgo}}}} | |||
<br> | |||
<br> | |||
===E.G.=== | ===E.G.=== | ||
Stock .vmt | Stock .vmt | ||
Line 27: | Line 58: | ||
} | } | ||
} | |||
</syntaxhighlight> | |||
{{csgo}} models/props/hr_massive/beachwaves/beachwaves.vmt | |||
<syntaxhighlight> | |||
UnlitTwoTexture | |||
{ | |||
"$beachfoam" "1" | |||
"$basetexture" "models/props/hr_massive/beachwaves/beachwaves" | |||
"$texture2" "models/props/hr_massive/beachwaves/beachwaves" | |||
"$additive" "1" | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 11:01, 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
$texture2
Second Texture that is used in different ways depending on which effects are used.
By default $basetexture
will be multiplied with $texture2
.

$texture2transform
$frame2
$beachfoam

On the Dangerzone Wave Model, both $texture2
and $basetexture
use the 'Beachwaves' Texture.
Todo: Do both Parameters need to use the same Texture?
The 'Beachwaves' Texture uses the RGB channels for different purposes.
Todo: Find a better Name for the Texture...
- Red Channel : Waves Albedo Texture
Todo: Can this be tinted using $color/$color2?
- Green Channel : Distortion/Noise for the Red Channel
- Blue Channel : Distortion/Noise for the Red Channel
Todo: Further documentation required.
$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"
}