Reorganise shaders

This commit is contained in:
2021-03-21 12:50:27 +01:00
parent a8ebf2f7f1
commit cf5a8b3e1b
32 changed files with 22 additions and 60 deletions
+18
View File
@@ -0,0 +1,18 @@
#version 430 core
in vec4 vColor;
in vec2 boxOut;
in vec2 boxIn;
out vec4 fColor;
void main()
{
//float d = x - y - 1 + 2* sqrt(y);
float d = sqrt(boxOut.x) + sqrt(boxOut.y) - 1;
// 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; }
fColor = vColor;
// if ( d < 0 || e > 0) { fColor = vec4(0,0,1,1); }
// if ( d < 0 || e > 0) { fColor = vec4(0,0,1,1); }
}