material-maker/addons/material_maker/nodes/quantize.mmg
2019-11-22 23:07:34 +01:00

42 lines
624 B
Plaintext

{
"name": "quantize",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"steps": 4
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(2.0*vec3(length($uv-vec2(0.5))), 1.0)",
"label": "",
"name": "in",
"type": "rgba"
}
],
"instance": "",
"name": "Quantize",
"outputs": [
{
"rgba": "vec4(floor($in($uv).rgb*$steps)/$steps, $in($uv).a)",
"type": "rgba"
}
],
"parameters": [
{
"default": 4,
"label": "",
"max": 32,
"min": 2,
"name": "steps",
"step": 1,
"type": "float"
}
]
},
"type": "shader"
}