mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Formating and doc.
This commit is contained in:
parent
df65433ee4
commit
3e5f6036ac
2 changed files with 6 additions and 5 deletions
|
@ -108,7 +108,7 @@ vec3 screen_space_dither(highp vec2 frag_coord) {
|
||||||
vec4 applyColorVision(vec4 color)
|
vec4 applyColorVision(vec4 color)
|
||||||
{
|
{
|
||||||
vec3 transformedColor = colorTransformMatrix * color.rgb;
|
vec3 transformedColor = colorTransformMatrix * color.rgb;
|
||||||
return vec4(transformedColor, color.a);
|
return vec4(transformedColor, color.a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
|
|
|
@ -9053,12 +9053,13 @@ child will follow movement and rotation of that bone.
|
||||||
* `vision_effects`: is a table that controls vision effects
|
* `vision_effects`: is a table that controls vision effects
|
||||||
* `color_transform_matrix`: is a matrix with default value (identity matrix):
|
* `color_transform_matrix`: is a matrix with default value (identity matrix):
|
||||||
```lua
|
```lua
|
||||||
{ {1.0, 0.0, 0.0},
|
{ {1.0, 0.0, 0.0}, -- r
|
||||||
{0.0, 1.0, 0.0},
|
{0.0, 1.0, 0.0}, -- g
|
||||||
{0.0, 0.0, 1.0}}
|
{0.0, 0.0, 1.0}} -- b
|
||||||
```
|
```
|
||||||
|
|
||||||
* can be used for creation color blind effect, base for night vision effect etc.
|
* Work as `transformed_color_RGB = color_transform_matrix * color_RGB`
|
||||||
|
* Can be used for creation color blind effect, base for night vision effect etc.
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
-- example of night vision like transform
|
-- example of night vision like transform
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue