mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +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": {
|
||||
"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": [
|
||||
{
|
||||
"default": "vec3(0.0)",
|
||||
@ -31,7 +31,7 @@
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"default": 2,
|
||||
"default": 4,
|
||||
"label": "",
|
||||
"name": "mode",
|
||||
"type": "enum",
|
||||
@ -47,6 +47,14 @@
|
||||
{
|
||||
"name": "Luminosity",
|
||||
"value": "luminosity"
|
||||
},
|
||||
{
|
||||
"name": "Min",
|
||||
"value": "min"
|
||||
},
|
||||
{
|
||||
"name": "Max",
|
||||
"value": "max"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user