$moss enable: Difference between revisions
MyGamepedia (talk | contribs) (→Issues) |
MyGamepedia (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{langsp}} | {{langsp}} | ||
[[File:MOSS.png|thumb|right|Moss shader example, for <code>$moss_texture</code> used <code>xen/moss00_d</code>.]] | [[File:MOSS.png|thumb|right|Moss shader example with [[LightmappedGeneric]], for <code>$moss_texture</code> used <code>xen/moss00_d</code>.]] | ||
This shader was created during development of Xen for {{bms|4}} and | [[File:MOSS25.png|thumb|right|Moss shader example with [[VertexLitGeneric]], for <code>$moss_texture</code> used <code>xen/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]] and [[LightmappedGeneric]] shaders. It was created during development of [[Xen]] for {{bms|4}} and was designed to simulate presence of moss on surface. | ||
For [[VertexLitGeneric]], it uses specified texture. For [[LightmappedGeneric]], 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 <code>.vmt</code>. | |||
All parameters works in the same way for both shaders. | |||
In {{bms|4}} was used for <code>models\props_xen\moss_test\sphereofchon.mdl</code> and <code>models\props_xen\moss_test\test_moss001.mdl</code> models. Both using <code>models/props_xen/moss_test/bubblemoss</code> texture. This shader was never used by developers in {{bms|4}} campaign, may be incomplete and incompatible with other shaders, use carefully.}} | |||
{{back | Black Mesa Level Creation}} | {{back | Black Mesa Level Creation}} | ||
== Parameters and Effects == | == Parameters and Effects == | ||
{{MatParam|$moss_enable|int|Toggle moss between enabled and disabled state. 1 - enabled, 0 - disabled.}} | {{MatParam|$moss_enable|int|Toggle moss between enabled and disabled state. 1 - enabled, 0 - disabled.}} | ||
{{MatParam|$moss_texture|texture| | {{MatParam|$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> | ||
<gallery mode=packed heights=410px> | <gallery mode=packed heights=410px> | ||
File:moss1.png |<code>metal/metalgrate013a</code> | File:moss1.png |<code>metal/metalgrate013a</code> ([[LightmappedGeneric]]) | ||
File:moss2.png |<code>dev/dev_ram_512_red </code> | File:moss2.png |<code>dev/dev_ram_512_red </code> ([[LightmappedGeneric]]) | ||
File:moss3.png |<code>xen/moss00_d</code> | File:moss3.png |<code>xen/moss00_d</code> ([[LightmappedGeneric]]) | ||
</gallery> | </gallery> | ||
}} | }} | ||
}} | }} | ||
{{MatParam|$moss_ref_direction|vector3|Defines direction for moss, the numbers can be negative. | {{MatParam|$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 28: | Line 32: | ||
}} | }} | ||
}} | }} | ||
{{MatParam|$moss_angle_theta|float|Inner angle value for [[displacement]] surfaces. Results depend on <code>$moss_angle_phi</code> and <code>$moss_angle_falloff</code>. | {{MatParam|$moss_angle_theta|float|Inner angle value. With [[LightmappedGeneric]], works only properly only for [[displacement]] surfaces. Results depend on <code>$moss_angle_phi</code> and <code>$moss_angle_falloff</code>. Works in similar way for [[VertexLitGeneric]]. | ||
{{expand|title=Examples.| | {{expand|title=Examples.| | ||
<br> | <br> | ||
Line 38: | Line 42: | ||
}} | }} | ||
}} | }} | ||
{{MatParam|$moss_angle_phi|float|Outer angle value for [[displacement]] surfaces. Results depend on <code>$moss_angle_theta</code> and <code>$moss_angle_falloff</code>. | {{MatParam|$moss_angle_phi|float|Outer angle value. With [[LightmappedGeneric]], works only properly only for [[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 48: | Line 52: | ||
}} | }} | ||
}} | }} | ||
{{MatParam|$moss_angle_falloff|float|Falloff value for [[displacement]] surfaces. Results depend on <code>$ | {{MatParam|$moss_angle_falloff|float|Falloff value. With [[LightmappedGeneric]], works only properly only for [[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> |
Revision as of 09:27, 1 June 2024


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 and LightmappedGeneric 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, 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. This shader was never used by developers in Black Mesa campaign, may be incomplete and incompatible with other shaders, use carefully.}}
Parameters and Effects
$moss_enable
$moss_texture
$moss_ref_direction
$moss_angle_theta
$moss_angle_phi
$moss_angle_falloff
$moss_scale
$moss_scale_turn_on_absolute
Issues
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 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)