mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Comments from sdf3d_color.mmg.
This commit is contained in:
parent
56ebdb0ec5
commit
666f735379
@ -12,7 +12,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
#Common
|
||||
#vec3 $(name_uv)_q = abs($uv) - vec3($sx, $sy, $sz);
|
||||
|
||||
#Output (sdf3d) - Shows the rounded box
|
||||
#Output - (sdf3d) - Shows the rounded box
|
||||
#length(max($(name_uv)_q,0.0))+min(max($(name_uv)_q.x,max($(name_uv)_q.y,$(name_uv)_q.z)),0.0)-$r
|
||||
|
||||
#Inputs:
|
||||
@ -25,7 +25,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
|
||||
#Outputs:
|
||||
|
||||
#Output (sdf3d) - Shows the sphere
|
||||
#Output - (sdf3d) - Shows the sphere
|
||||
#length($uv)-$r
|
||||
|
||||
#Inputs:
|
||||
@ -41,7 +41,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
#vec3 $(name_uv)_p = $uv;
|
||||
#$(name_uv)_p.$axis -= clamp($(name_uv)_p.$axis, -$l, $l);
|
||||
|
||||
#Output (sdf3d) - Shows the capsule
|
||||
#Output - (sdf3d) - Shows the capsule
|
||||
#length($(name_uv)_p)-$r*$profile(clamp(0.5+0.5*($uv).$axis/$l, 0.0, 1.0))
|
||||
|
||||
#Inputs:
|
||||
@ -62,7 +62,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
#+Z: $axis = length($uv.xy),-$uv.z
|
||||
#-Z: $axis = length($uv.xy),$uv.z
|
||||
|
||||
#Output (sdf3d)
|
||||
#Output - (sdf3d)
|
||||
#dot(vec2(cos($a*0.01745329251),sin($a*0.01745329251)),vec2($axis))
|
||||
|
||||
#Inputs:
|
||||
@ -82,7 +82,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
#-Z: $axis = length($uv.xy),$uv.z
|
||||
|
||||
#Output (sdf3d)
|
||||
#Output (sdf3dc) - The shape generated by the repeat operation
|
||||
#Output - (sdf3dc) - The shape generated by the repeat operation
|
||||
#$in(repeat($uv, vec3(1.0/$rx, 1.0/$ry, 0.0), float($seed), $r))
|
||||
|
||||
#Inputs:
|
||||
@ -97,7 +97,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
|
||||
#Outputs:
|
||||
|
||||
#Output (sdf3dc) - The rotated object
|
||||
#Output - (sdf3dc) - The rotated object
|
||||
#$in(rotate3d($uv, -vec3($ax, $ay, $az)*0.01745329251))
|
||||
|
||||
#Inputs:
|
||||
@ -109,7 +109,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
|
||||
#Outputs:
|
||||
|
||||
#Output (sdf3dc) - Shows the cylinder
|
||||
#Output - (sdf3dc) - Shows the cylinder
|
||||
#min(max($(name_uv)_d.x,$(name_uv)_d.y),0.0) + length(max($(name_uv)_d,0.0))
|
||||
|
||||
#Inputs:
|
||||
@ -127,7 +127,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
#Y: $axis = y
|
||||
#Z: $axis = z
|
||||
|
||||
#Output (sdf3dc) - Shows the plane
|
||||
#Output - (sdf3dc) - Shows the plane
|
||||
#$uv.$axis
|
||||
|
||||
#Inputs:
|
||||
@ -144,7 +144,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
#Z: $axis = length($uv.xy)-$R,$uv.z
|
||||
#vec2 $(name_uv)_q = vec2($axis);
|
||||
|
||||
#Output (sdf3dc) - Shows the torus
|
||||
#Output - (sdf3dc) - Shows the torus
|
||||
#length($(name_uv)_q)-$r
|
||||
|
||||
#Inputs:
|
||||
@ -161,7 +161,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
#Subtraction $op = sdf3dc_sub
|
||||
#Intersection $op = sdf3dc_inter
|
||||
|
||||
#Output (sdf3dc) - The shape generated by the boolean operation
|
||||
#Output - (sdf3dc) - The shape generated by the boolean operation
|
||||
#$op($in1($uv), $in2($uv))
|
||||
|
||||
#Inputs:
|
||||
@ -184,6 +184,7 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
#sdf3d_angle.mmg (includes sdf3d_rotate.mmg)
|
||||
|
||||
#Outputs:
|
||||
|
||||
#Shows the angleThe shape generated by the boolean operation
|
||||
#$(name_uv)_d
|
||||
|
||||
@ -201,6 +202,18 @@ const Commons = preload("res://addons/mat_maker_gd/nodes/common/commons.gd")
|
||||
#axis, enum, default: 0, values: X, Y, Z
|
||||
#angle, float, min: 0, max: 360, default:180, step:0.1
|
||||
|
||||
#----------------------
|
||||
#sdf3d_color.mmg
|
||||
|
||||
#Outputs:
|
||||
|
||||
#Output - sdf3dc - The colored 3D object
|
||||
#vec2($in($uv), $c)
|
||||
|
||||
#Inputs:
|
||||
#color_index, float, min: 0, max: 1, default:0, step:0.01
|
||||
#in, vec2, default:vec2(100, 0.0), (sdf3d input)
|
||||
|
||||
static func raymarch(uv : Vector2) -> Color:
|
||||
var d : Vector2 = sdf3d_raymarch(uv);
|
||||
|
||||
|
@ -1,51 +0,0 @@
|
||||
{
|
||||
"name": "sdf3d_color",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"parameters": {
|
||||
"c": 0.5
|
||||
},
|
||||
"shader_model": {
|
||||
"code": "",
|
||||
"global": "",
|
||||
"inputs": [
|
||||
{
|
||||
"default": "0.0",
|
||||
"label": "",
|
||||
"longdesc": "The input 3D object",
|
||||
"name": "in",
|
||||
"shortdesc": "Input",
|
||||
"type": "sdf3d"
|
||||
}
|
||||
],
|
||||
"instance": "",
|
||||
"longdesc": "Assigns a color index to a 3D object",
|
||||
"name": "Color",
|
||||
"outputs": [
|
||||
{
|
||||
"longdesc": "The colored 3D object",
|
||||
"sdf3dc": "vec2($in($uv), $c)",
|
||||
"shortdesc": "Output",
|
||||
"type": "sdf3dc"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"control": "None",
|
||||
"default": 0,
|
||||
"label": "",
|
||||
"longdesc": "The color index to be assigned",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"name": "c",
|
||||
"shortdesc": "Color",
|
||||
"step": 0.01,
|
||||
"type": "float"
|
||||
}
|
||||
],
|
||||
"shortdesc": "Color"
|
||||
},
|
||||
"type": "shader"
|
||||
}
|
Loading…
Reference in New Issue
Block a user