$moss enable: Difference between revisions
MyGamepedia (talk | contribs) No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
== Parameters and Effects == | == Parameters and Effects == | ||
{{ | {{MatParamDef|$moss_enable|bool|Toggle moss between enabled and disabled state. 1 - enabled, 0 - disabled.}} | ||
{{ | {{MatParamDef|$moss_texture|texture|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]]. | ||
{{expand|title=Examples.| | {{expand|title=Examples.| | ||
<br> | <br> | ||
Line 35: | Line 35: | ||
}} | }} | ||
}} | }} | ||
{{ | {{MatParamDef|$moss_ref_direction|vector3|Defines direction for moss, the numbers can be negative. Works in the same way for [[VertexLitGeneric]]. | ||
{{expand|title=Examples.| | {{expand|title=Examples.| | ||
<br> | <br> | ||
Line 45: | Line 45: | ||
}} | }} | ||
}} | }} | ||
{{ | {{MatParamDef|$moss_angle_theta|float|Inner angle value. With [[LightmappedGeneric]], works properly only on [[displacement]] surfaces. Results depend on <code>$moss_angle_phi</code> and <code>$moss_angle_falloff</code>. Works in a similar way for [[VertexLitGeneric]]. | ||
{{expand|title=Examples.| | {{expand|title=Examples.| | ||
<br> | <br> | ||
Line 55: | Line 55: | ||
}} | }} | ||
}} | }} | ||
{{ | {{MatParamDef|$moss_angle_phi|float|Outer angle value. With [[LightmappedGeneric]], works properly only on [[displacement]] surfaces. Results depend on <code>$moss_angle_theta</code> and <code>$moss_angle_falloff</code>. Works in similar way for [[VertexLitGeneric]]. | ||
{{expand|title=Examples.| | {{expand|title=Examples.| | ||
<br> | <br> | ||
Line 65: | Line 65: | ||
}} | }} | ||
}} | }} | ||
{{ | {{MatParamDef|$moss_angle_falloff|float|Falloff value. With [[LightmappedGeneric]], works properly only on [[displacement]] surfaces. Results depend on <code>$moss_angle_phi</code> and <code>$moss_angle_theta</code>. Works in similar way for [[VertexLitGeneric]]. | ||
{{expand|title=Examples.| | {{expand|title=Examples.| | ||
<br> | <br> | ||
Line 75: | Line 75: | ||
}} | }} | ||
}} | }} | ||
{{ | {{MatParamDef|$moss_blend_factor|float|Moss blend factor. Use values from 0 to 1, others do not work correctly. | ||
{{expand|title=Examples.| | {{expand|title=Examples.| | ||
<br> | <br> | ||
Line 85: | Line 85: | ||
}} | }} | ||
}} | }} | ||
{{ | {{MatParamDef|$moss_scale|float|Scale for moss. Deprecated and non-functional. Use [[$seamless_scale]] instead.}} | ||
{{ | {{MatParamDef|$moss_scale_turn_on_absolute|bool|Toggle moss scale between enabled and disabled state. 1 - enabled, 0 - disabled. Affects nothing at least in {{bms|4|nt=2}}.|deprecated=1}} | ||
{{ | {{MatParamDef|$seamless_scale|float|This parameter scales texture for this shader. | ||
{{expand|title=Examples.| | {{expand|title=Examples.| | ||
<gallery mode=packed heights=290px> | <gallery mode=packed heights=290px> |
Latest revision as of 12:06, 23 August 2025


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

$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 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 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. Besides moss, it was also used for dust caps and other small details.
This shader also should be good for a snow layer.



|
Parameters and Effects
|
|
$moss_angle_phi
and $moss_angle_falloff
. Works in a similar way for VertexLitGeneric.
|
$moss_angle_theta
and $moss_angle_falloff
. Works in similar way for VertexLitGeneric.
|
$moss_angle_phi
and $moss_angle_theta
. Works in similar way for VertexLitGeneric.
|

See also
- New Specular
- BlackMesa XenEngine: Part1 – Heavily Modified Source Engine (page from Black Mesa developer about Black Mesa engine, better known as XenEngine)