mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Add relevant comments from radial_gradient.mmg and circular_gradient.mmg.
This commit is contained in:
parent
44df757149
commit
b077bc83ac
@ -19,8 +19,16 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
|
||||
#radial_gradient.mmg
|
||||
|
||||
#output: $gradient(fract($repeat*1.41421356237*length(fract($uv)-vec2(0.5, 0.5))))
|
||||
|
||||
#repeat: default: 1, min: 1, max : 32, step: 1
|
||||
|
||||
#circular_gradient.mmg
|
||||
|
||||
#output: gradient(fract($repeat*0.15915494309*atan($uv.y-0.5, $uv.x-0.5)))
|
||||
|
||||
#repeat: default: 1, min: 1, max : 32, step: 1
|
||||
|
||||
#gradient.gd
|
||||
|
||||
static func radial_gradient_type_1(uv : Vector2, repeat : float, data : PoolRealArray) -> Color:
|
||||
|
@ -1,89 +0,0 @@
|
||||
{
|
||||
"name": "circular_gradient",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
},
|
||||
"repeat": 1
|
||||
},
|
||||
"shader_model": {
|
||||
"code": "",
|
||||
"global": "",
|
||||
"inputs": [
|
||||
|
||||
],
|
||||
"instance": "",
|
||||
"name": "Circular Gradient",
|
||||
"outputs": [
|
||||
{
|
||||
"longdesc": "Number of repetitions of the gradient",
|
||||
"rgba": "$gradient(fract($repeat*0.15915494309*atan($uv.y-0.5, $uv.x-0.5)))",
|
||||
"shortdesc": "Repeat",
|
||||
"type": "rgba"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"control": "None",
|
||||
"default": 1,
|
||||
"label": "Repeat",
|
||||
"longdesc": "Number of repetitions of the gradient",
|
||||
"max": 32,
|
||||
"min": 1,
|
||||
"name": "repeat",
|
||||
"shortdesc": "Repeat",
|
||||
"step": 1,
|
||||
"type": "float"
|
||||
},
|
||||
{
|
||||
"default": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
},
|
||||
"label": "Gradient",
|
||||
"longdesc": "Gradient to be spread on the image",
|
||||
"name": "gradient",
|
||||
"shortdesc": "Gradient",
|
||||
"type": "gradient"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "shader"
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
{
|
||||
"name": "radial_gradient",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
},
|
||||
"repeat": 1
|
||||
},
|
||||
"shader_model": {
|
||||
"code": "",
|
||||
"global": "",
|
||||
"inputs": [
|
||||
|
||||
],
|
||||
"instance": "",
|
||||
"name": "Radial Gradient",
|
||||
"outputs": [
|
||||
{
|
||||
"longdesc": "An image showing the gradient",
|
||||
"rgba": "$gradient(fract($repeat*1.41421356237*length(fract($uv)-vec2(0.5, 0.5))))",
|
||||
"shortdesc": "Output",
|
||||
"type": "rgba"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"control": "None",
|
||||
"default": 1,
|
||||
"label": "Repeat",
|
||||
"longdesc": "Number of repetitions of the gradient",
|
||||
"max": 32,
|
||||
"min": 1,
|
||||
"name": "repeat",
|
||||
"shortdesc": "Repeat",
|
||||
"step": 1,
|
||||
"type": "float"
|
||||
},
|
||||
{
|
||||
"default": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
},
|
||||
"label": "Gradient",
|
||||
"longdesc": "Gradient to be spread on the image",
|
||||
"name": "gradient",
|
||||
"shortdesc": "Gradient",
|
||||
"type": "gradient"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "shader"
|
||||
}
|
Loading…
Reference in New Issue
Block a user