Continue refactoring shaders

This commit is contained in:
2021-03-10 21:22:52 +01:00
parent 4a455cc7c9
commit a2fa713bde
10 changed files with 29 additions and 375 deletions
+5 -4
View File
@@ -1,5 +1,6 @@
#version 430 core
in vec4 gColor;
in vec4 gColorC;
in vec4 gColorE;
in vec2 gBoundingBox;
out vec4 fColor;
@@ -7,8 +8,8 @@ out vec4 fColor;
void main()
{
if ( dot(gBoundingBox,gBoundingBox) > 1) { discard; }
fColor = gColor;
// fColor = vec4 (1,1,1,1);
float d = dot(gBoundingBox,gBoundingBox);
if ( d > 1) { discard; }
fColor = mix (gColorE , gColorC, d);
}
//note it is the fragdepth that stops this from being square