This article's documentation is for anything that uses the Source engine. Click here for more information.

Core (shader): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (→‎top: Unicodifying, replaced: [[Image: → [[File:)
Line 1: Line 1:
{{lang}}
{{lang}}
[[Image:Citadel_core_shader.jpg|thumb|right|200px|The Citadel Core, which uses this shader.]]
[[File:Citadel_core_shader.jpg|thumb|right|200px|The Citadel Core, which uses this shader.]]
{{this is a|pixel shader|name=Core|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.
{{this is a|pixel shader|name=Core|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 <code>prop_coreball</code> at the position of (2688,12139,5170). This value is hardcoded into the shader.}}
{{note|In order for this shader to work properly, it must be used with a <code>prop_coreball</code> at the position of (2688,12139,5170). This value is hardcoded into the shader.}}

Revision as of 08:34, 8 January 2024

English (en)Translate (Translate)
The Citadel Core, which uses this shader.

Core is a Pixel shader available in all Source Source games since Half-Life 2: Episode One 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.pngNote: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.pngNote:This shader does not exist in engine branches after the Orange Box.

Shader Parameters

$corecolortexture $corecolortextureframe $normalmap $dudvmap $bumpframe $bumptransform [[$envmap|$envmap]] $envmapframe $envmaptint $envmapcontrast $envmapsaturation $refractamount $refracttint [[$flowmap|$flowmap]] $flowmapframe $flowmapscrollrate $flowmaptexcoordoffset

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
		}
	}
}