-
Notifications
You must be signed in to change notification settings - Fork 0
/
metal01.vmt
69 lines (60 loc) · 4.64 KB
/
metal01.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
"VertexLitGeneric"
{
//////////////////////////////////////////////////////////////////////////////////
// Trying to setup a metal effect with Phong and EnvMap simultanusly (WIP)
//
// By: Davi (Debiddo) Gooz
//////////////////////////////////////////////////////////////////////////////////
$model "1" // this texture is made for models, and not ui
$nodecal "0" // allow decals by default
$nocull "0" // render just the face frontside, set one to also render the "inside" of the mesh
$normalmapalphaenvmapmask "1" // use $bumpmap Alpha channel as $envmaskmap // NOTE: Not work with $basemapalphaphongmask 1 or $basemapluminancephongmask 1
$allowdiffusemodulation "1" // allow $color $color2 tint
$blendtintbybasealpha "0" // use $basetexture Alpha channel as $color2 mask
$blendtintcoloroverbase "0" // where to tint. 0 is under $basetexture. 1 is over the $basetexture (float 0 to 1)
$surfaceprop "metal" // control the decal and sound on hit; Buggy in gmod since 2018
//////////////////////////////////////////////////////////////////////////////////
// Textures
// the basic is $BaseTexture
// all other parameters are for optimizations and use a single material
// and a trade-off of optimizations by use more memory
//////////////////////////////////////////////////////////////////////////////////
$basetexture "shared/generic_red255" // 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"
//$phongwarptexture "models/ministrider/mini_iridescence" // is like an phong color ramp
//$lightwarptexture "shared/lightwarp_surfacetoonitself" // is like an diffuse color ramp
$color2 " [ .9 .9 .9 ] " // used to tint the Albedo, " { 255 255 255 } " default
$phong "1" // enable phong, set zero to disable all phong and rimlight at same time
$phongboost ".8" // multiply phong by this value
$phongalbedotint "1" // use the $basetexture's RGB as tint value per textel
$phongtint " { 83 85 122 } " // uncomment if you need a solid phong color and $phongalbedotint is 0
$phongalbedoboost "108" // for SFM, multiply the tint channel by this value // NOTE: Disabled if $detail is present see: https://github.com/Facepunch/garrysmod-issues/issues/5557
$phongexponent "4" // for override the default $phongexponenttexture's Red Channel
$phongexponent2 "5" // for CS:GO compatibles, used in specific light sources
$phongexponentfactor "1.08" // multiply the $phongexponenttexture red channel by this value
$phongfresnelranges " [ 1 3 2 ] " // XYZ fresnel values, you can use any float values
// here the magic, we boost the $basetexture with $detail // NOTE: Breaks $phongalbedoboost
$detail "shared/generic_blue255"
// Mental Notes: if you use on one model's vmt, all other materials of the same mdl file should use, or your model will become brighter than expected at $body and $model qc parameters.
// BUG: GMod cannot handle materials with mixed on/off $detail
$detailscale "1" // do not scale and use the original size
$detailblendmode "1" // set zero to use as "decal". RGB values higher than 127 make brighter (intense), and lower make it darker. TIP.: use to tunedown the HDR overbright.
$detailblendfactor ".1" // multiply the $detail by this value. like: how much the effect is in use.
$rimlight "0" // rimlight enabled
$rimmask "0" // use $phongexponenttexture Alpha Channel as mask
$rimlightboost "2.1" // multiply the rimlight by this value
$rimlightexponent "1.1" // multiply the rimlight fresnel by this value
$envmap "env_cubemap" // choose the env_cubemap texture
$envmaptint " [ .8 .8 .8 ] " // tune the intensity effect
$envmapfresnel "1" // fresnel is multiplied by this value
$envmapcontrast ".8" // color*color control
$SelfIllum "0"
$EmissiveBlendEnabled "0"
$EmissiveBlendTexture "vgui/white" // a BW image pattern (where should be emissive) (I8 format)
$EmissiveBlendBaseTexture "shared/generic_red255" // our effect
$EmissiveBlendFlowTexture "vgui/white" // a RGB image vector
$EmissiveBlendTint " [ .5 .5 .5 ] "
$EmissiveBlendStrength ".6"
$EmissiveBlendScrollVector " [ 0 0 ] "
}