chore: format shaders
This commit is contained in:
@@ -9,8 +9,7 @@ uniform mat4 mvp;
|
||||
out vec2 fragTexCoord;
|
||||
out vec4 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
void main() {
|
||||
fragTexCoord = vertexTexCoord;
|
||||
fragColor = vertexColor;
|
||||
|
||||
|
||||
@@ -25,9 +25,7 @@ float getShapeInfluence(vec2 pos) {
|
||||
vec2 uv = pos / resolution;
|
||||
uv.y = 1.0 - uv.y;
|
||||
|
||||
if (any(lessThan(uv, vec2(0.0))) || any(greaterThan(uv, vec2(1.0)))) {
|
||||
return 0.0;
|
||||
}
|
||||
if (any(lessThan(uv, vec2(0.0))) || any(greaterThan(uv, vec2(1.0)))) return 0.0;
|
||||
|
||||
float signedDistance = texture(distanceFieldTex, uv).r * 255.0 - 128.0;
|
||||
|
||||
@@ -47,8 +45,7 @@ float getShapeInfluence(vec2 pos) {
|
||||
return isInside * insideInfluence + isOutside * outsideInfluence;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
void main() {
|
||||
vec2 pixelPos = fragTexCoord * resolution;
|
||||
|
||||
float ballValue = getBallInfluence(pixelPos, mousePos, ballRadius);
|
||||
|
||||
Reference in New Issue
Block a user