$moss_enable

From Valve Developer Community
Jump to: navigation, search

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

English (en)
Edit
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 specified texture. For LightmappedGeneric and Lightmapped_4WayBlend, instead of using texture itself for moss, this shader takes color that most of the texture consists of and then applies color to surface according to the parameters specified in .vmt. All parameters works in the same way for both shaders.

In Black Mesa Black Mesa was used for models\props_xen\moss_test\sphereofchon.mdl and models\props_xen\moss_test\test_moss001.mdl models. Both using 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).

Note.pngNote:There is no Hammer Hammer preview for this shader.
Black Mesa Level Creation

Parameters and Effects

Toggle moss between enabled and disabled state. 1 - enabled, 0 - disabled.
For LightmappedGeneric, defines a diffuse texture that will use moss for color. For VertexLitGeneric, defines a diffuse texture that will use moss and mix with normalmap.
Examples.


Defines direction for moss, the numbers can be negative. Works in the same way for VertexLitGeneric.
Examples.


Inner angle value. With LightmappedGeneric, works only properly only for displacement surfaces. Results depend on $moss_angle_phi and $moss_angle_falloff. Works in similar way for VertexLitGeneric.
Examples.


Outer angle value. With LightmappedGeneric, works only properly only for displacement surfaces. Results depend on $moss_angle_theta and $moss_angle_falloff. Works in similar way for VertexLitGeneric.
Examples.


Falloff value. With LightmappedGeneric, works only properly only for displacement surfaces. Results depend on $moss_angle_phi and $moss_angle_theta. Works in similar way for VertexLitGeneric.
Examples.


Scale for moss. Deprecated and non-functional. Use $seamless_scale instead, it will scale the moss texture.
Examples.


Toggle moss scale between enabled and disabled state. 1 - enabled, 0 - disabled. Effects nothing at least in Black Mesa Black Mesa: Definitive Edition.

Bugs/Limitations

Incompatible with new specular shader

New specular shader doesn't blending with moss shader.

See also