-
Notifications
You must be signed in to change notification settings - Fork 0
/
_tint.vmt
83 lines (74 loc) · 1.39 KB
/
_tint.vmt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
"VertexLitGeneric"
{
// Purpose: sample of dynamic tint HDR Overbright based where the player/entity is looking
$lighting ".499"
$MinLighting ".432"
$MaxLighting ".897"
$LightBoost ".9"
$clr ".0"
$zro ".0"
$color " [ 1 1 1 ] "
Proxies
{
// Split $color vector otherwise it doesn't work in Gmod
Clamp
{
srcVar1 $zro
min "$color[0]"
max "$color[0]"
resultVar "$color[0]"
}
Clamp
{
srcVar1 $zro
min "$color[1]"
max "$color[1]"
resultVar "$color[1]"
}
Clamp
{
srcVar1 $zro
min "$color[2]"
max "$color[2]"
resultVar "$color[2]"
}
// drive $lighting
Pupil
{
TextureVar $basetexture
TextureFrameNumVar $frame
PupilCloseRate .08
PupilOpenRate .08
}
Subtract
{
srcVar1 $LightBoost
srcVar2 $lighting
resultVar $clr
}
// Clamp for limit and prevent to bright/dark
Clamp
{
min $MinLighting
max $MaxLighting
srcVar1 $clr
resultVar $clr
}
// Transfer the calc light from Pupil to $color
Equals
{
srcVar1 $clr
resultVar "$color[0]"
}
Equals
{
srcVar1 $clr
resultVar "$color[1]"
}
Equals
{
srcVar1 $clr
resultVar "$color[2]"
}
}
}