Ensure aggressive dead-code stripping doesn't break tests

This commit is contained in:
baldurk
2020-07-01 16:45:32 +01:00
parent c11b147c42
commit b26fdae758
2 changed files with 7 additions and 6 deletions
+4 -1
View File
@@ -50,6 +50,9 @@ void main()
const std::string pixel = R"EOSHADER(
#version 460 core
layout(location = 0) in vec4 OUTPOSITION;
layout(location = 1) in vec4 OUTCOLOR;
layout(location = 0, index = 0) out vec4 Color;
layout(binding = 0, std140) uniform constsbuf
@@ -60,7 +63,7 @@ layout(binding = 0, std140) uniform constsbuf
void main()
{
Color = outcol;
Color = outcol + 1e-6f * OUTPOSITION + 1e-6f * OUTCOLOR;
}
)EOSHADER";
+3 -5
View File
@@ -56,7 +56,7 @@ void main()
vertOut.pos = vec4(Position.xyz, 1);
gl_Position = vertOut.pos;
vertOut.col = Color;
vertOut.uv = vec4(UV.xy, 0, 1);
vertOut.uv = vec4(UV.xy, 1e-12f, 1);
}
)EOSHADER";
@@ -404,14 +404,12 @@ void main()
while(Running())
{
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glBindVertexArray(vao);
float col[] = {0.2f, 0.2f, 0.2f, 1.0f};
glClearBufferfv(GL_COLOR, 0, col);
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glBindVertexArray(vao);
glBindBufferRange(GL_UNIFORM_BUFFER, 0, cb, bindOffset * sizeof(Vec4f), 1024 * sizeof(Vec4f));
glUseProgram(program);