mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-18 01:06:47 +01:00
Fix a few newlines.
This commit is contained in:
parent
1bc5139058
commit
057ad6c4bc
@ -20,7 +20,8 @@ static func shape_circle(uv : Vector2, sides : float, size : float, edge : float
|
||||
return clamp((1.0 - distance / size) / edge, 0.0, 1.0)
|
||||
|
||||
#float shape_polygon(vec2 uv, float sides, float size, float edge) {
|
||||
# uv = 2.0*uv-1.0;edge = max(edge, 1.0e-8);
|
||||
# uv = 2.0*uv-1.0;
|
||||
# edge = max(edge, 1.0e-8);
|
||||
# float angle = atan(uv.x, uv.y)+3.14159265359;
|
||||
# float slice = 6.28318530718/sides;
|
||||
# return clamp((1.0-(cos(floor(0.5+angle/slice)*slice-angle)*length(uv))/size)/edge, 0.0, 1.0);
|
||||
@ -41,7 +42,8 @@ static func shape_polygon(uv : Vector2, sides : float, size : float, edge : floa
|
||||
return clamp((size - cos(floor(0.5 + angle / slice) * slice - angle) * uv.length()) / (edge * size), 0.0, 1.0)
|
||||
|
||||
#float shape_star(vec2 uv, float sides, float size, float edge) {
|
||||
# uv = 2.0*uv-1.0;edge = max(edge, 1.0e-8);
|
||||
# uv = 2.0*uv-1.0;
|
||||
# edge = max(edge, 1.0e-8);
|
||||
# float angle = atan(uv.x, uv.y);
|
||||
# float slice = 6.28318530718/sides;
|
||||
# return clamp((1.0-(cos(floor(angle*sides/6.28318530718-0.5+2.0*step(fract(angle*sides/6.28318530718), 0.5))*slice-angle)*length(uv))/size)/edge, 0.0, 1.0);
|
||||
@ -62,7 +64,8 @@ static func shape_star(uv : Vector2, sides : float, size : float, edge : float)
|
||||
return clamp((size - cos(floor(1.5 + angle / slice - 2.0 * Commons.step(0.5 * slice, Commons.modf(angle, slice))) * slice - angle) * uv.length()) / (edge * size), 0.0, 1.0);
|
||||
|
||||
#float shape_curved_star(vec2 uv, float sides, float size, float edge) {
|
||||
# uv = 2.0*uv-1.0;edge = max(edge, 1.0e-8);
|
||||
# uv = 2.0*uv-1.0;
|
||||
# edge = max(edge, 1.0e-8);
|
||||
# float angle = 2.0*(atan(uv.x, uv.y)+3.14159265359);
|
||||
# float slice = 6.28318530718/sides;
|
||||
# return clamp((1.0-cos(floor(0.5+0.5*angle/slice)*2.0*slice-angle)*length(uv)/size)/edge, 0.0, 1.0);
|
||||
@ -83,7 +86,9 @@ static func shape_curved_star(uv : Vector2, sides : float, size : float, edge :
|
||||
return clamp((size - cos(floor(0.5 + 0.5 * angle / slice) * 2.0 * slice - angle) * uv.length())/(edge * size), 0.0, 1.0);
|
||||
|
||||
#float shape_rays(vec2 uv, float sides, float size, float edge) {
|
||||
# uv = 2.0*uv-1.0;edge = 0.5*max(edge, 1.0e-8)*size;float slice = 6.28318530718/sides;
|
||||
# uv = 2.0*uv-1.0;
|
||||
# edge = 0.5*max(edge, 1.0e-8)*size;
|
||||
# float slice = 6.28318530718/sides;
|
||||
# float angle = mod(atan(uv.x, uv.y)+3.14159265359, slice)/slice;
|
||||
# return clamp(min((size-angle)/edge, angle/edge), 0.0, 1.0);
|
||||
#}
|
||||
|
Loading…
Reference in New Issue
Block a user