'fixed' glGetAttribLocation crashes (shader compiler likes to agressively optimize)

This commit is contained in:
2019-08-11 21:46:18 -05:00
parent f11b091fe0
commit d07130b03b
3 changed files with 21 additions and 14 deletions

View File

@@ -5,6 +5,11 @@ in vec4 outNormal;
in vec3 outUV;
in float outTextureID;
// optimizing compilers are annoying at this stage of my understanding of GLSL
vec4 lokiVar;
void main() {
gl_FragColor = vec4(outColor, 1.0);
lokiVar = vec4(outColor, 1.0) + outNormal + vec4(outUV, 1.0) + vec4(outTextureID, 1.0, 1.0, 1.0);
lokiVar = normalize(lokiVar);
gl_FragColor = vec4(lokiVar);
}