Core
Core
is a pixel shader available in all Source games since Half-Life 2: Episode One. It is used to create a unstable, reflecting and refracting core of energy, used exclusively for the Core reactor in the Citadel in Episode One.
Note:In order for this shader to work properly, it must be used with a
prop_coreball
at the position of (2688,12139,5170). This value is hardcoded into the shader.Note:This shader does not exist in engine branches after the Orange Box.
Shader Parameters
The texture to use for the colors that get dynamically modified by the shader. The alpha channel of the
$corecolortexture
determines the translucency of the core.The frame to start an animated
$corecolortexture
on.The frame to start an animated bumpmap on.
Todo: This may not work with the proxy required for the effect.
Transforms the bump map texture.
- The default position is
center .5 .5 scale 1 1 rotate 0 translate 0 0
.center
defines the point of rotation. Only useful ifrotate
is being used.scale
fits the texture into the material the given number of times.2 1
is a 50% scale in the horizontal X axis while the vertical Y axis is still at original scale.rotate
rotates the texture counter-clockwise in degrees. Accepts any number, including negatives.translate
shifts the texture by the given numbers..5
will shift it half-way. 1 will shift it once completely over, which is the same as not moving it at all.
- Note:All values must be included!
- Bug:Scaling the texture may cause odd issues where the Texture Lock tool in Hammer will not actually lock the texture in place. [todo tested in?]
- Bug:Rotating textures applied on brushes will rotate around the map origin (confirm: Orangebox engine only?). A fix for this is to change the center position in the VMT to the brush's origin. [todo tested in?]
The frame to start an animated cubemap on.
Controls the intensity of the reflection's red, green and blue color channels. Any positive number can be used. Default is
"[1 1 1]"
, which means 100% intensity. Note:You must use quotemarks, as there are space characters within the value.
Controls the contrast of the reflection. 0 is natural contrast, while 1 is the full squaring of the color (i.e. color*color).
Controls the colour saturation of the reflection. 0 is greyscale, while 1 is natural saturation.
Controls the strength of the refraction by multiplying the normal map intensity.
Tints the color of the refraction.
The frame to start an animated flowmap on.
The rate at which the normal map scrolls along the flowmap.
Todo: Texture offset for the flowmap? Modified by proxies, as seen below.
Example
The Core material used in Episode One, materials/models/props_combine/core_sheet.vmt
"Core" { "$normalmap" "Models/props_combine/core_normal" "$dudvmap" "Models/props_combine/core_dudv" "$corecolortexture" "models/props_combine/corewarpcolor" "$flowmap" "models/props_combine/core_flow" "$model" 1 "$REFRACTAmOUNT" "0.15" "$FLOWMAPSCROLLRATE" "[.0475 .133]" // "$envmap" "CustomCubeMaps/core" "$envmap" "env_cubemap" "$refracttint" "[0.7 0.7 0.6]" "$envmaptint" "[0.8 0.6 0.6]" "$FLOWMAPTEXCOORDOFFSET" "1.0" "$TempMin" 0 "$TempMax" 1 "core_dx70" { "$fallbackmaterial" "models/props_combine/coredx70" } "core_dx80" { "$normalmap" "dev/water_normal" "$dudvmap" "dev/water_dudv" "$bumptransform" "center .5 .5 scale 5 5 rotate 0 translate 0 0" "$envmapcontrast" "1.0" } "Proxies" { "Sine" { "resultVar" "$FLOWMAPTEXCOORDOFFSET" "sineperiod" 4 "sinemin" "$TempMin" "sinemax" "$TempMax" } "AnimatedTexture" { "animatedtexturevar" "$normalmap" "animatedtextureframenumvar" "$bumpframe" "animatedtextureframerate" 29.00 } } }