$moss enable: Difference between revisions
MyGamepedia (talk | contribs) |
MyGamepedia (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{langsp}} | {{langsp}} | ||
[[File:MOSS. | [[File:MOSS=.jpg|thumb|right|Moss shader example with [[LightmappedGeneric]], for <code>$moss_texture</code> used <code>xen/moss00_d</code>.]] | ||
[[File:MOSS25. | [[File:MOSS25=.jpg|thumb|right|Moss shader example with [[VertexLitGeneric]], for <code>$moss_texture</code> used <code>models/props_xen/moss_test/bubblemoss</code>.]] | ||
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 {{bms|4}} and was designed to simulate presence of moss on surface. | 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 {{bms|4}} and was designed to simulate presence of moss on surface. | ||
Line 17: | Line 17: | ||
<br> | <br> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:moss1. | File:moss1=.jpg|<code>metal/metalgrate013a</code> ([[LightmappedGeneric]]) | ||
File:moss2. | File:moss2=.jpg|<code>dev/dev_ram_512_red </code> ([[LightmappedGeneric]]) | ||
File:moss3. | File:moss3=.jpg|<code>xen/moss00_d</code> ([[LightmappedGeneric]]) | ||
</gallery> | </gallery> | ||
}} | }} | ||
Line 27: | Line 27: | ||
<br> | <br> | ||
<gallery mode=packed heights=510px> | <gallery mode=packed heights=510px> | ||
File:moss1d. | File:moss1d=.jpg|<code>$moss_ref_direction "[1 0 0]"</code> | ||
File:moss2d. | File:moss2d=.jpg|<code>$moss_ref_direction "[0 1 0]</code> | ||
File:moss3d. | File:moss3d=.jpg|<code>$moss_ref_direction "[0 0 1]</code> | ||
</gallery> | </gallery> | ||
}} | }} | ||
Line 37: | Line 37: | ||
<br> | <br> | ||
<gallery mode=packed heights=510px> | <gallery mode=packed heights=510px> | ||
File:moss1t-. | File:moss1t-=.jpg|<code>$moss_angle_theta 1, $moss_angle_phi 10, $moss_angle_falloff 0.5.</code> | ||
File:moss2t-. | File:moss2t-=.jpg|<code>$moss_angle_theta 5, $moss_angle_phi 10, $moss_angle_falloff 0.5.</code> | ||
File:moss3t-. | File:moss3t-=.jpg|<code>$moss_angle_theta 10, $moss_angle_phi 10, $moss_angle_falloff 0.5</code> | ||
</gallery> | </gallery> | ||
}} | }} | ||
Line 47: | Line 47: | ||
<br> | <br> | ||
<gallery mode=packed heights=510px> | <gallery mode=packed heights=510px> | ||
File:moss1p. | File:moss1p=.jpg|<code>$moss_angle_theta 50, $moss_angle_phi 50, $moss_angle_falloff 0.5.</code> | ||
File:moss2p. | File:moss2p=.jpg|<code>$moss_angle_theta 50, $moss_angle_phi 100, $moss_angle_falloff 0.5.</code> | ||
File:moss3p. | File:moss3p=.jpg|<code>$moss_angle_theta 50, $moss_angle_phi 200, $moss_angle_falloff 0.5.</code> | ||
</gallery> | </gallery> | ||
}} | }} | ||
Line 57: | Line 57: | ||
<br> | <br> | ||
<gallery mode=packed heights=510px> | <gallery mode=packed heights=510px> | ||
File:moss1f. | File:moss1f=.jpg|<code>$moss_angle_theta 10, $moss_angle_phi 200, $moss_angle_falloff 0.5.</code> | ||
File:moss2f. | File:moss2f=.jpg|<code>$moss_angle_theta 10, $moss_angle_phi 200, $moss_angle_falloff 10</code> | ||
File:moss3f. | File:moss3f=.jpg|<code>$moss_angle_theta 10, $moss_angle_phi 200, $moss_angle_falloff 500</code> | ||
</gallery> | </gallery> | ||
}} | }} | ||
Line 67: | Line 67: | ||
<br> | <br> | ||
<gallery mode=packed heights=510px> | <gallery mode=packed heights=510px> | ||
File:moss1b. | File:moss1b=.jpg|<code>$moss_blend_factor 0.5</code> | ||
File:moss2b. | File:moss2b=.jpg|<code>$moss_blend_factor 0.8</code> | ||
File:moss3b. | File:moss3b=.jpg|<code>$moss_blend_factor 1.0</code> | ||
</gallery> | </gallery> | ||
}} | }} | ||
Line 88: | Line 88: | ||
New specular shader doesn't blending with moss shader. | New specular shader doesn't blending with moss shader. | ||
<gallery mode=nolines heights=256px widths=384px> | <gallery mode=nolines heights=256px widths=384px> | ||
Black Mesa Screenshot 2024.01.14 - 11.48.45.07. | Black Mesa Screenshot 2024.01.14 - 11.48.45.07=.jpg|An example with [[LightmappedGeneric]]. The specular should be yellow and not white. | ||
Black Mesa Screenshot 2024.06.01 - 18.51.17.26. | Black Mesa Screenshot 2024.06.01 - 18.51.17.26=.jpg|An example with [[VertexLitGeneric]]. The specular should be green and not white. | ||
</gallery> | </gallery> | ||
Revision as of 03:32, 23 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)