minor edit to use built-ins for Shader

This commit is contained in:
2025-10-22 10:53:09 -06:00
parent 80c807475d
commit bafba2f09f
2 changed files with 5 additions and 5 deletions

View File

@@ -1,7 +1,5 @@
shader_type canvas_item;
#define TWO_PI 6.28318530718
uniform vec2 resolution = vec2(40,40);
uniform vec2 u_resolution;
uniform float u_time;
@@ -26,7 +24,7 @@ void fragment() {
float angle = pow(atan(toCenter.y, toCenter.x), 1.0);
float radius = length(toCenter)*2.0;
float normHue = (angle/TWO_PI)+0.5;
float normHue = (angle/(PI*2.0))+0.5;
normHue = pow(normHue, 3.0);
color = hsb2rgb(vec3(normHue,radius,1.0));

View File

@@ -19,5 +19,7 @@ grow_vertical = 2
[node name="ColorRect" type="ColorRect" parent="."]
material = SubResource("ShaderMaterial_s1hel")
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
offset_left = 276.0
offset_top = 50.0
offset_right = 316.0
offset_bottom = 90.0