Refactor rendering

This commit is contained in:
jgk
2021-06-23 15:16:30 +02:00
parent 899c1c5f6e
commit 9f1b501388
5 changed files with 25 additions and 33 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ out vec4 fColor;
void main()
{
//float d = x - y - 1 + 2* sqrt(y);
float d = sqrt(boxOut.x) + sqrt(boxOut.y) - 1;
float d = sqrt(boxOut.x) + sqrt(boxOut.y) - 1.0;
// float e = sqrt(f(x,wStart)) + sqrt(f(y,wEnd)) - 1.0;
float e = sqrt(boxIn.x) + sqrt(boxIn.y) - 1.0;
if ( d < 0 || e > 0) { discard; }
+1 -1
View File
@@ -10,7 +10,7 @@ out vec2 gTexCoord;
void main()
{
gl_Position = vec4(aPos, 1.0);
gl_Position = worldMat * vec4(aPos, 1.0);
gColor = aColor;
gTexCoord = aTexCoord;
}