m Minor image fixes. |
Automated: update 'HighPriorityIntegration' description |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
== Usage == | == Usage == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|HighPriorityIntegration|Bool| {{ | |HighPriorityIntegration|Bool|{{Asset HighPriorityIntegration Field}} | ||
|Rect|Rect| {{stub}} | |Rect|Rect| {{stub}} | ||
|RectClip|Bool| {{stub}} | |RectClip|Bool| {{stub}} | ||
Line 26: | Line 26: | ||
|StencilReadMask|Byte| {{stub}} | |StencilReadMask|Byte| {{stub}} | ||
|RenderQueue|Int| {{stub}} | |RenderQueue|Int| {{stub}} | ||
|_shader| | |_shader|{{RootFieldType|AssetRef`1|[[Type:Shader|Shader]]}}|TypeAdv10=true| {{stub}} | ||
|RatioRed|Float|The proportion of red to use for grayscale computation | |RatioRed|Float|The proportion of red to use for grayscale computation | ||
|RatioGreen|Float|The proportion of green to use for grayscale computation | |RatioGreen|Float|The proportion of green to use for grayscale computation | ||
|RatioBlue|Float|The proportion of blue to use for grayscale computation | |RatioBlue|Float|The proportion of blue to use for grayscale computation | ||
|Lerp|Float|How much to passthrough of the original (0) or use the filter (1) | |Lerp|Float|How much to passthrough of the original (0) or use the filter (1) | ||
|Gradient| | |Gradient|{{RootFieldType|AssetRef`1|[[Type:ITexture2D|ITexture2D]]}}|TypeAdv15=true|A texture which maps black values on its far left and white values on its far right | ||
|BlendMode|BlendMode| {{stub}} | |BlendMode|BlendMode| {{stub}} | ||
|Sidedness|Sidedness| {{stub}} | |Sidedness|Sidedness| {{stub}} | ||
Line 39: | Line 39: | ||
<!--T:4--> | <!--T:4--> | ||
== Behavior == | == Behavior == | ||
This material acts as a filter which applies on top of other materials. | This material acts as a filter which applies on top of other materials. | ||
Line 62: | Line 61: | ||
== Related Components == | == Related Components == | ||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}| | [[Category:Components{{#translation:}}|Grayscale Material]] | ||
[[Category:Components:Assets:Materials{{#translation:}}| | [[Category:Components:Assets:Materials:Filters{{#translation:}}|Grayscale Material]] | ||
[[Category:Materials]] | [[Category:Materials:Filters{{#translation:}}|Grayscale Material]] | ||
[[Category:Materials{{#translation:}}|Grayscale Material]] |
Latest revision as of 11:59, 1 August 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Introduction
GrayscaleMaterial is a material that allows the mapping of grayscale values from 0 to 1 to any other value. This is analogous to the Color Ramp node in Blender. A common misconception is that this can only produce black and white values, however that is only the default gradient, and a user-provided Gradient texture allows for various colored effects.
Usage
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
HighPriorityIntegration
|
Bool | If true, integrating this asset (e.g. processing procedural assets) gets higher priority than assets with this flag off. An example is user laser procedural meshes. |
Rect
|
Rect | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
RectClip
|
Bool | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
ColorMask
|
ColorMask | The color channels to affect |
StencilComparison
|
StencilComparison | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
StencilOperation
|
StencilOperation | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
StencilID
|
Byte | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
StencilWriteMask
|
Byte | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
StencilReadMask
|
Byte | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
RenderQueue
|
Int | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
_shader
|
Shader | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
RatioRed
|
Float | The proportion of red to use for grayscale computation |
RatioGreen
|
Float | The proportion of green to use for grayscale computation |
RatioBlue
|
Float | The proportion of blue to use for grayscale computation |
Lerp
|
Float | How much to passthrough of the original (0) or use the filter (1) |
Gradient
|
ITexture2D | A texture which maps black values on its far left and white values on its far right |
BlendMode
|
BlendMode | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
Sidedness
|
Sidedness | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
ZWrite
|
ZWrite | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
ZTest
|
ZTest | This article or section is a Stub. You can help the Resonite Wiki by expanding it. |
Behavior
This material acts as a filter which applies on top of other materials.
It first computes a grayscale value for all pixels that overlap with the filter which is computed through a weighted combination of Red, Green, and Blue values that can be directly controlled through the respective ratio inputs.
A user-provided Gradient texture defines how these values are then remapped. The leftmost part of this texture defines what color will correspond to Black (0) and the rightmost part of this texture defines the color that maps to White (1). It is important to set the WrapModeU of this texture to Clamp or else it will bleed values from either side of the texture.
The Lerp field allows you to transition between having the filter off (0) and fully on (1).
Examples