- May 25, 2021
- 12
- 1
I can't figure out how to retrieve a vector of the entity origin using the EntityOrigin proxy ( https://developer.valvesoftware.com/wiki/List_of_material_proxies )
I can retrieve the player position using the PlayerPosition proxy that takes a resultVar variable.
I have found uses of a couple other proxies of that have a similar format to EntityOrigin ($somethingInParamterListStartingWithMoneySymbol) , but they haven't given me much clues.
Here is all of combine_helicopter_new_bladeblur.vmt
And I looked at some water vmts that include either
or
I would expect the following to make func_brushes with the texture applied to have an alpha of 0.05 when well below the origin and 0.95 when well above it, but instead the alpha seems to always be 0.75
Thanks for your time!
I can retrieve the player position using the PlayerPosition proxy that takes a resultVar variable.
I have found uses of a couple other proxies of that have a similar format to EntityOrigin ($somethingInParamterListStartingWithMoneySymbol) , but they haven't given me much clues.
Here is all of combine_helicopter_new_bladeblur.vmt
"VertexLitGeneric"
{
// Original shader: VertexLitTranslucentTexture
"$translucent" 1
"$nocull" 1
"$basetexture" "models/Combine_Helicopter/combine_helicopter_new_bladeblur"
"$nodecal" 1
"Proxies"
{
"HeliBlade"
{
}
}
}
And I looked at some water vmts that include either
"WaterLOD"
{
}
or
"WaterLOD"
{
// fixme! This has to be here, or material loading barfs.
"dummy" 0
}
I would expect the following to make func_brushes with the texture applied to have an alpha of 0.05 when well below the origin and 0.95 when well above it, but instead the alpha seems to always be 0.75
LightmappedGeneric
{
$basetexture "sprites/bu_ca" //dev/dev_measuregeneric01b de_dust/dutile9 de_chateau/interiortile02
$color "[1 1 1]"
$zero 0
$temp1 "0.75"
Proxies
{
EntityOrigin
{
}
Clamp
{
srcVar1 $zero
min "$entityorigin[2]"
max "$entityorigin[2]"
resultVar $temp1
}
Clamp
{
srcVar1 $temp1
min "0.05"
max "0.95"
resultVar $temp1
}
Equals
{
srcVar1 $temp1
resultVar $alpha
}
}
}
Thanks for your time!