mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Change 1f to 1.0 in shaders
This makes them work on Godot 3.5
This commit is contained in:
parent
d13814b9b9
commit
7683af09df
|
@ -1,4 +1,3 @@
|
|||
|
||||
shader_type canvas_item;
|
||||
render_mode unshaded;
|
||||
|
||||
|
@ -47,14 +46,14 @@ void fragment() {
|
|||
hsb.y = mix(hsb.y, 1 , sat_shift_amount);
|
||||
}
|
||||
else if (sat_shift_amount < 0.0) {
|
||||
hsb.y = mix(0, hsb.y , 1f - abs(sat_shift_amount));
|
||||
hsb.y = mix(0, hsb.y , 1.0 - abs(sat_shift_amount));
|
||||
}
|
||||
|
||||
if(val_shift_amount > 0.0) {
|
||||
hsb.z = mix(hsb.z, 1 , val_shift_amount);
|
||||
}
|
||||
else if (val_shift_amount < 0.0) {
|
||||
hsb.z = mix(0, hsb.z , 1f - abs(val_shift_amount));
|
||||
hsb.z = mix(0, hsb.z , 1.0 - abs(val_shift_amount));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -14,13 +14,13 @@ void fragment() {
|
|||
vec4 selection_color = texture(selection, UV);
|
||||
vec4 col = original_color;
|
||||
if (red)
|
||||
col.r = 1f - col.r;
|
||||
col.r = 1.0 - col.r;
|
||||
if (green)
|
||||
col.g = 1f - col.g;
|
||||
col.g = 1.0 - col.g;
|
||||
if (blue)
|
||||
col.b = 1f - col.b;
|
||||
col.b = 1.0 - col.b;
|
||||
if (alpha)
|
||||
col.a = 1f - col.a;
|
||||
col.a = 1.0 - col.a;
|
||||
|
||||
vec4 output = mix(original_color.rgba, col, selection_color.a);
|
||||
COLOR = output;
|
||||
|
|
Loading…
Reference in a new issue