$moss_enable

From Valve Developer Community
Revision as of 07:59, 18 June 2025 by MyGamepedia (talk | contribs)
Jump to navigation Jump to search
English (en)Translate (Translate)

$moss_enable is a material shader parameter available in Black Mesa Black Mesa.

Moss shader example with LightmappedGeneric, for $moss_texture used xen/moss00_d.
Moss shader example with VertexLitGeneric, for $moss_texture used models/props_xen/moss_test/bubblemoss.

This is procedural moss implementation, which is triplanar projection shader that allows you to project additional texture that mixes with normalmap. This shader available for VertexLitGeneric, LightmappedGeneric and Lightmapped_4WayBlend shaders. It was created during development of Xen for Black Mesa Black Mesa and was designed to simulate presence of moss on surface.

For VertexLitGeneric, it uses the specified texture. For LightmappedGeneric and Lightmapped_4WayBlend, instead of using the texture itself for moss, this shader takes color that most of the texture consists of and then applies color to the surface according to the parameters specified in .vmt. All parameters works in the same way for both shaders.

In Black Mesa Black Mesa it was used for models\props_xen\moss_test\sphereofchon.mdl and models\props_xen\moss_test\test_moss001.mdl models. Both using the models/props_xen/moss_test/bubblemoss texture. The final version of the game doesn't use this shader in any of the maps. May be incompatible with some shaders (as it was with $phong).

This shader was used in Black Mesa: Blue Shift Black Mesa: Blue Shift. Besides moss, it was also used for dust caps and other small details.

This shader also should be good for a snow layer.

Note.pngNote:There is no Hammer Hammer preview for this shader.
Icon-Bug.pngBug:This shader doesn't blend with new specular and $phong.
Examples.

Parameters and Effects

$moss_enable $moss_texture $moss_ref_direction $moss_angle_theta $moss_angle_phi $moss_angle_falloff $moss_blend_factor $moss_scale $moss_scale_turn_on_absolute $seamless_scale

See also