When trying to create code, it is unknown which parameter causes a strange error, which causes the plugin to start referring to a non-existent line of code
(null) (52, 48): Expected '{'
The funny thing is, no matter what the code is, it most often refers to this line
All my code:
uniform float2 ShapeSize = float2(200.0, 200.0);
uniform float CornerRadius = 20.0;
uniform float Squircleness = 2.0;
uniform float Softness = 2.0;
float superellipse(float2 uv, float2 center, float2 size, float n)
{
float2 p = abs((uv - center) / (size * 0.5));
float dist = pow(pow(p.x, n) + pow(p.y, n), 1.0 / n);
return 1.0 - step(1.0, dist);
}
float4 mainImage(VertData v_in) : TARGET
{
float2 uv = v_in.uv;
float2 center = float2(0.5, 0.5);
float mask = superellipse(uv, center, ShapeSize, Squircleness);
float4 color = image.Sample(textureSampler, uv);
color.a *= mask;
return color;
}
As you can see, there's nothing special, and lines 52 don't even smell here
When trying to create code, it is unknown which parameter causes a strange error, which causes the plugin to start referring to a non-existent line of code
(null) (52, 48): Expected '{'
The funny thing is, no matter what the code is, it most often refers to this line
All my code:
As you can see, there's nothing special, and lines 52 don't even smell here