Skip to content

Commit

Permalink
Merge pull request #290 from GMLambda/toxic
Browse files Browse the repository at this point in the history
Make the toxic material more toxic, remove color post processing
  • Loading branch information
ZehMatt authored May 25, 2024
2 parents 13af64f + 6083826 commit 640e68b
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 14 deletions.
73 changes: 73 additions & 0 deletions content/materials/nature/toxicslime002a.vmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// envmaptint_fix
"LightmappedGeneric"
{
"LightmappedGeneric_DX6"
{
"$fallbackmaterial" "nature/toxicslime002a_dx70"
}

"$envmap" "env_cubemap"
"$envmaptint" "[ 1.00 .89 .80 ]"
"$envmapcontrast" "1"

"$surfaceprop" "slime"
"%keywords" "wasteland"
"%compileSlime" 1

"$bottommaterial" "nature/toxicslime002a_beneath"

"$fogenable" 1
"$fogcolor" "{29 199 39}"
"$fogstart" 1.00
"$fogend" 330.00

$color "[0.9 2.2 0.5]"
$selfillum 1

// Use scrolling animated textures on DX9 hardware
">=DX90"
{
"$basetexture" "Nature/toxicslime002a"
"$bumpmap" "dev/waterA_normal" // These two slide...
"$bumpmap2" "dev/waterB_normal" // ...against each other

"$bumpmask" "Nature/toxicslime002a_normal" // This holds still and alpha masks to get final normal

"Proxies"
{
"TextureScroll"
{
"texturescrollvar" "$bumptransform"
"texturescrollrate" 0.03
"texturescrollangle" 100.00
"texturescale" 2.8
}
"TextureScroll"
{
"texturescrollvar" "$bumptransform2"
"texturescrollrate" 0.03
"texturescrollangle" -36.00
"texturescale" 3.4
}
}
}

// Use animated texture on Pre DX9 hardware
"<DX90"
{
"$basetexture" "Nature/toxicslime002a"
"$bumpmap" "Nature/slime_normal"
"$normalmapalphaenvmapmask" "1"

"Proxies"
{
"AnimatedTexture"
{
"animatedtexturevar" "$bumpmap"
"animatedtextureframenumvar" "$bumpframe"
"animatedtextureframerate" 21.00
}
}
}

}
14 changes: 0 additions & 14 deletions gamemode/cl_postprocess.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,6 @@ end

local LAST_GEIGER_RANGE = 1000

local RADIATION_COLOR_MOD = {
["$pp_colour_addr"] = 0,
["$pp_colour_addg"] = 0,
["$pp_colour_addb"] = 0,
["$pp_colour_brightness"] = 0,
["$pp_colour_contrast"] = 1,
["$pp_colour_colour"] = 1.0,
["$pp_colour_mulr"] = 0,
["$pp_colour_mulg"] = 0,
["$pp_colour_mulb"] = 0
}

function GM:RenderRadiationEffects(ply)
GenerateFilmGrain()
local curGeigerRange = math.Clamp(ply:GetGeigerRange() * 4, 0, 1000)
Expand All @@ -69,8 +57,6 @@ function GM:RenderRadiationEffects(ply)
GRAIN_MAT:SetFloat("$alpha", iv)
render.SetMaterial(GRAIN_MAT)
render.DrawScreenQuad()
RADIATION_COLOR_MOD["$pp_colour_mulg"] = iv * 3
DrawColorModify(RADIATION_COLOR_MOD)
end

function GM:RenderSprintEffect(ply)
Expand Down

0 comments on commit 640e68b

Please sign in to comment.