-
Notifications
You must be signed in to change notification settings - Fork 0
/
toon.vmt
88 lines (72 loc) · 5.49 KB
/
toon.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
87
88
"VertexLitGeneric"
{
//////////////////////////////////////////////////////////////////////////////////
// Genéric Material for: Cartoon/Toon
//
// By: Davi (Debiddo) Gooz
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// Main parameters
//////////////////////////////////////////////////////////////////////////////////
$model "1" // this texture is made for models, and not a menu
$nodecal "0" // allow decals by default
$nocull "0" // render just the frontside, set zero to also render the "inside" of the mesh
$alphatest "0" // set on/off $basetexture Alpha channel as transparency
$translucent "0" // the true gradient
$additive "0" // like $translucent but ignore light
$basealphaenvmapmask "0" // $basetexture Alpha channel as $envmaskmap. // NOTE: Only when no $bumpmap is present
$normalmapalphaenvmapmask "0" // $bumpmap Alpha channel as $envmaskmap // NOTE: Not work with $basemapalphaphongmask 1 or $basemapluminancephongmask 1
$basemapalphaphongmask "0" // $basetexture Alpha channel as phong mask // BUG: Don't work for GMod
$basemapluminancephongmask "1" // use computed luminance of the $basetexture as phong mask
$allowalphatocoverage "0" // Control AntiAliasing for alphatest
//$alphatestreference "0.01" // threshold to when $alphatest is usable. Alpha transparency clip point (Almost incompatible with everything)
$halflambert "0" // halflambert phong shading
$phongdisablehalflambert "1" // force disable halflambert, use with $halflambert 0
//////////////////////////////////////////////////////////////////////////////////
// Main textures
//////////////////////////////////////////////////////////////////////////////////
$basetexture "vgui/white" // Diffuse or Albedo texture
$bumpmap "dev/flat_normal" // Bump/Normal map | Alpha Channel is used for "$phong 1" mask by default
$phongexponenttexture "vgui/white" // phong modulator, Red channel is exponent; Green channel as $phongalbedotint modulator; Blue channel unused; Alpha channel is for $rimlightmask 1
$lightwarptexture "shared/lightwarp_toon" // is like an diffuse color ramp
//////////////////////////////////////////////////////////////////////////////////
// Color Modulator
//////////////////////////////////////////////////////////////////////////////////
$allowdiffusemodulation "1" // allow $color / $color2 tint
$blendtintcoloroverbase "0" // where to tint. 0 is under $basetexture. 1 is over the $basetexture (float 0 to 1)
$blendtintbybasealpha "0" // use $basetexture Alpha channel as $color2 mask
$color2 " [ .985 .985 .985 ] " // used to tint the Albedo. (Default: " [ 1 1 1 ] ")
//////////////////////////////////////////////////////////////////////////////////
// Phong specullarity
//////////////////////////////////////////////////////////////////////////////////
$phong "1" // enable phong, set zero to disable all phong and rimlight at same time
$forcephong "1" // force phong enabled even on lowend cards
$phongboost "1.5" // multiply phong by this value
$phongalbedotint "1" // use the $basetexture's RGB as tint value per textel
$phongalbedoboost "1" // for SFM, multiply the $phongexponenttexture Green channel by this value // NOTE: Disabled if $detail is present see: https://github.com/Facepunch/garrysmod-issues/issues/5557
$phongexponent "200" // for override the default $phongexponenttexture's Red Channel
$phongexponent2 "222" // for CS:GO compatibles, used in specific light sources
$phongexponentfactor "1" // multiply the $phongexponenttexture red channel by this value
$phongfresnelranges " [ 0 .1 5 ] " // XYZ fresnel values, you can use any float values
//////////////////////////////////////////////////////////////////////////////////
// $Detail to boost colors do trick
//////////////////////////////////////////////////////////////////////////////////
//$detail "shared/lightwarp_black" // here the magic, we boost the $basetexture with $detail // NOTE: Breaks $phongalbedoboost
//$detailscale "1" // do not scale, and use the original size
//$detailblendmode "5" // set "0" to use as decal (finetune hdr) || "5" to use as "$selfillum".
//$detailblendfactor "1" // multiply the $detail by this value. like: how much the effect is in use.
//////////////////////////////////////////////////////////////////////////////////
// Rim Lighting
//////////////////////////////////////////////////////////////////////////////////
$rimlight "1" // rimlight enabled
$rimmask "0" // use $phongexponenttexture Alpha Channel as mask
$rimlightboost "11" // multiply the rimlight by this value
//////////////////////////////////////////////////////////////////////////////////
// Envmap / Reflections, recommended use a mask
//////////////////////////////////////////////////////////////////////////////////
//$envmap "env_cubemap" // choose the env_cubemap texture
//$envmap "shared/env_cybersleuth" // choose the env_cubemap texture
$envmaptint " [ .3 .3 .3 ] " // tune the intensity effect
$envmapfresnel "1" // fresnel is multiplied by this value
$envmapcontrast "0.8" // color*color control, only when no $phong
}