mirror of
https://github.com/Relintai/material-maker.git
synced 2025-01-25 18:59:18 +01:00
Fixed pattern node
Triangle was stupidly named saw, sawtooth was missing
This commit is contained in:
parent
cc1ccb8835
commit
30c711920f
@ -17,7 +17,7 @@ float wave_sin(float x) {
|
|||||||
return 0.5-0.5*cos(3.1415928*2.0*x);
|
return 0.5-0.5*cos(3.1415928*2.0*x);
|
||||||
}
|
}
|
||||||
|
|
||||||
float wave_saw(float x) {
|
float wave_triangle(float x) {
|
||||||
x = fract(x);
|
x = fract(x);
|
||||||
return min(2.0*x, 2.0-2.0*x);
|
return min(2.0*x, 2.0-2.0*x);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ var x_scale = 4.0
|
|||||||
var y_wave = 0
|
var y_wave = 0
|
||||||
var y_scale = 4.0
|
var y_scale = 4.0
|
||||||
|
|
||||||
const WAVE_FCT = [ "wave_sin", "wave_saw", "wave_square" ]
|
const WAVE_FCT = [ "wave_sin", "wave_triangle", "wave_square", "fract" ]
|
||||||
const MIX_FCT = [ "mix_multiply", "mix_add", "mix_max", "mix_min", "mix_xor", "mix_pow" ]
|
const MIX_FCT = [ "mix_multiply", "mix_add", "mix_max", "mix_min", "mix_xor", "mix_pow" ]
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
@ -181,7 +181,7 @@ group = null
|
|||||||
text = "Sine"
|
text = "Sine"
|
||||||
flat = false
|
flat = false
|
||||||
align = 0
|
align = 0
|
||||||
items = [ "Sine", null, false, 0, null, "Saw", null, false, 1, null, "Square", null, false, 2, null ]
|
items = [ "Sine", null, false, 0, null, "Triangle", null, false, 1, null, "Square", null, false, 2, null, "Sawtooth", null, false, 3, null ]
|
||||||
selected = 0
|
selected = 0
|
||||||
_sections_unfolded = [ "Rect" ]
|
_sections_unfolded = [ "Rect" ]
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ group = null
|
|||||||
text = "Sine"
|
text = "Sine"
|
||||||
flat = false
|
flat = false
|
||||||
align = 0
|
align = 0
|
||||||
items = [ "Sine", null, false, 0, null, "Saw", null, false, 1, null, "Square", null, false, 2, null ]
|
items = [ "Sine", null, false, 0, null, "Triangle", null, false, 1, null, "Square", null, false, 2, null, "Sawtooth", null, false, 3, null ]
|
||||||
selected = 0
|
selected = 0
|
||||||
_sections_unfolded = [ "Rect" ]
|
_sections_unfolded = [ "Rect" ]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user