mirror of
https://github.com/Relintai/material-maker.git
synced 2025-01-09 05:39:38 +01:00
Added min ad max options to the greyscale node
This commit is contained in:
parent
ff9688d16e
commit
a850af674f
@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
"shader_model": {
|
"shader_model": {
|
||||||
"code": "",
|
"code": "",
|
||||||
"global": "float gs_lightness(vec3 c) {\n\treturn 0.5*(max(c.r, max(c.g, c.b)) + min(c.r, min(c.g, c.b)));\n}\nfloat gs_average(vec3 c) {\n\treturn 0.333333333333*(c.r + c.g + c.b);\n}\nfloat gs_luminosity(vec3 c) {\n\treturn 0.21 * c.r + 0.72 * c.g + 0.07 * c.b;\n}\n",
|
"global": "float gs_min(vec3 c) {\n\treturn min(c.r, min(c.g, c.b));\n}\nfloat gs_max(vec3 c) {\n\treturn max(c.r, max(c.g, c.b));\n}\nfloat gs_lightness(vec3 c) {\n\treturn 0.5*(max(c.r, max(c.g, c.b)) + min(c.r, min(c.g, c.b)));\n}\nfloat gs_average(vec3 c) {\n\treturn 0.333333333333*(c.r + c.g + c.b);\n}\nfloat gs_luminosity(vec3 c) {\n\treturn 0.21 * c.r + 0.72 * c.g + 0.07 * c.b;\n}\n",
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
"default": "vec3(0.0)",
|
"default": "vec3(0.0)",
|
||||||
@ -31,7 +31,7 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"default": 2,
|
"default": 4,
|
||||||
"label": "",
|
"label": "",
|
||||||
"name": "mode",
|
"name": "mode",
|
||||||
"type": "enum",
|
"type": "enum",
|
||||||
@ -47,6 +47,14 @@
|
|||||||
{
|
{
|
||||||
"name": "Luminosity",
|
"name": "Luminosity",
|
||||||
"value": "luminosity"
|
"value": "luminosity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Min",
|
||||||
|
"value": "min"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Max",
|
||||||
|
"value": "max"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user