$moss enable: Difference between revisions
MyGamepedia (talk | contribs) No edit summary |
MyGamepedia (talk | contribs) |
||
Line 60: | Line 60: | ||
File:moss2f.png |<code>$moss_angle_theta 10, $moss_angle_phi 200, $moss_angle_falloff 10</code> | File:moss2f.png |<code>$moss_angle_theta 10, $moss_angle_phi 200, $moss_angle_falloff 10</code> | ||
File:moss3f.png |<code>$moss_angle_theta 10, $moss_angle_phi 200, $moss_angle_falloff 500</code> | File:moss3f.png |<code>$moss_angle_theta 10, $moss_angle_phi 200, $moss_angle_falloff 500</code> | ||
</gallery> | |||
}} | |||
}} | |||
{{MatParam|$moss_blend_factor|float|Moss blend factor. Use values from 0 to 1, other works incorrectly. | |||
{{expand|title=Examples.| | |||
<br> | |||
<gallery mode=packed heights=510px> | |||
File:moss1b.png |<code>$moss_blend_factor 0.5</code> | |||
File:moss2b.png |<code>$moss_blend_factor 0.8</code> | |||
File:moss3b.png |<code>$moss_blend_factor 1.0</code> | |||
</gallery> | </gallery> | ||
}} | }} |
Revision as of 06:11, 2 June 2024



$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 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 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).


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
Bugs/Limitations
Incompatible with new specular shader
New specular shader doesn't blending with moss shader.
An example with LightmappedGeneric. The specular should be yellow and not white.
An example with VertexLitGeneric. The specular should be green and not white.
See also
- New Specular
- BlackMesa XenEngine: Part1 – Heavily Modified Source Engine (page from Black Mesa developer about Black Mesa engine, better known as XenEngine)