ParallaxTest: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(4 intermediate revisions by 4 users not shown)
Line 3: Line 3:
Accepts only a [[$basetexture]], of which the alpha channel is used as the heightmap.
Accepts only a [[$basetexture]], of which the alpha channel is used as the heightmap.


[[File:Ezgif.com-gif-maker(1).gif|thumb|450px|Successful implementation, by placing a surface using [[Modulate]] shader, to fake lightmaps ontop of the otherwise fullbright parallax mapped texture. Click to see animated preview.]]
[[File:Ezgif.com-gif-maker(1).gif|thumb|450px|Successful implementation, by placing a surface using [[Modulate]] shader, to fake lightmaps ontop of the otherwise fullbright parallax mapped texture (Click image if thumbnail is not animated).]]


{{bug|The material will always be drawn [[Fullbright|unlit]].}}
{{bug|hidetested=1|The material will always be drawn [[Fullbright|unlit]].}}


{{note|There's a workaround for this bug, as lightmaps can be faked with [[Modulate]] shader}}
{{note|There's a workaround for this bug, as lightmaps can be faked with [[Modulate]] shader}}
Line 14: Line 14:
The texture scale in hammer seems to correspond to the depth of the parallax effect. Higher scale -> deeper parallax.
The texture scale in hammer seems to correspond to the depth of the parallax effect. Higher scale -> deeper parallax.
Models with this material will rendered invisible.
Models with this material will rendered invisible.
{{MatParamDef|$basetexture|texture|Defines an albedo texture.}}
{{MatParamDef|$bumpmap|texture|Specifies a texture that will provide three-dimensional lighting information for a material. Since it doesn't have lighting, it just exist.}}






[[Category:Shaders]]
[[Category:Shaders]]

Latest revision as of 11:46, 23 August 2025

ParallaxTest is an unfinished shader since Alien Swarm (although not available in SDK 2013) which draws parallax mapping on an albedo. Alternative to the disabled $parallaxmap shader parameter. Accepts only a $basetexture, of which the alpha channel is used as the heightmap.

Successful implementation, by placing a surface using Modulate shader, to fake lightmaps ontop of the otherwise fullbright parallax mapped texture (Click image if thumbnail is not animated).
Icon-Bug.pngBug:The material will always be drawn unlit.
Note.pngNote:There's a workaround for this bug, as lightmaps can be faked with Modulate shader


Todo: Document/test more of this shader!

The texture scale in hammer seems to correspond to the depth of the parallax effect. Higher scale -> deeper parallax. Models with this material will rendered invisible.

Defines an albedo texture.
Specifies a texture that will provide three-dimensional lighting information for a material. Since it doesn't have lighting, it just exist.