-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_bbq.vmt
86 lines (80 loc) · 2.29 KB
/
_bbq.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
84
85
86
VertexLitGeneric {
// Purpose: Sample for BBQ that modify fresnel when the entity burn
$PhongFresnelRanges " [ .0 .5 1 ] " // the default 3D vector that will be driven by the above values
// This is just to store values
$PhongFresnelRange_0 ".0" // Fresnel at front view (0º)
$PhongFresnelRange_1 ".0" // Fresnel at 3/4 view (45º)
$PhongFresnelRange_2 ".0" // fresnel at back view/rimlight (180º)
$PhongFresnelRangeX ".0"
$PhongFresnelRangeY ".0"
$PhongFresnelRangeZ ".0"
$BBQ ".0" // fetch BBQ every frame
$BBQMult "1.01" // This scales BBQ Modulation
Proxies {
BBQLevel {
resultVar $BBQ
}
Multiply {
srcVar1 $BBQ
srcVar2 $BBQMult
resultVar $BBQ
}
// Split $phongfresnelranges vectors
Clamp {
min "$PhongFresnelRanges[0]"
max "$PhongFresnelRanges[0]"
srcVar1 $zero
resultVar $PhongFresnelRangeX
}
Clamp {
min "$PhongFresnelRanges[1]"
max "$PhongFresnelRanges[1]"
srcVar1 $zero
resultVar $PhongFresnelRangeY
}
Clamp {
min "$PhongFresnelRanges[2]"
max "$PhongFresnelRanges[2]"
srcVar1 $zero
resultVar $PhongFresnelRangeZ
}
// store user defined $PhongFresnelRanges vectors and use at Proxie setup
LessOrEqual {
lessEqualVar $PhongFresnelRangeX
greaterVar $PhongFresnelRange_0
srcVar1 $PhongFresnelRange_0
srcVar2 $zero
resultVar $PhongFresnelRange_0
}
LessOrEqual {
lessEqualVar $PhongFresnelRangeY
greaterVar $PhongFresnelRange_1
srcVar1 $PhongFresnelRange_1
srcVar2 $zero
resultVar $PhongFresnelRange_1
}
LessOrEqual {
lessEqualVar $PhongFresnelRangeZ
greaterVar $PhongFresnelRange_2
srcVar1 $PhongFresnelRange_2
srcVar2 $zero
resultVar $PhongFresnelRange_2
}
// modulate $phongfresnelranges with BBQ
Multiply {
srcVar1 $PhongFresnelRange_0
srcVar2 $BBQ
resultVar "$PhongFresnelRanges[0]"
}
Multiply {
srcVar1 $PhongFresnelRange_1
srcVar2 $BBQ
resultVar "$PhongFresnelRanges[1]"
}
Multiply {
srcVar1 $PhongFresnelRange_2
srcVar2 $BBQ
resultVar "$PhongFresnelRanges[2]"
}
}
}