Fix (i)vec3 std140;

This commit is contained in:
bjorn 2018-08-03 12:32:32 -07:00
parent 75159a7823
commit 66c1f373d3
1 changed files with 2 additions and 2 deletions

View File

@ -1322,7 +1322,7 @@ Shader* lovrShaderCreate(const char* vertexSource, const char* fragmentSource) {
} else if (uniform.type == UNIFORM_MATRIX) {
uniform.size = values[matrixStride] * uniform.components;
} else {
uniform.size = uniform.components > 1 ? 16 : 4;
uniform.size = 4 * (uniform.components == 3 ? 4 : uniform.components);
}
vec_push(&storageBlocks->data[values[blockIndex]].uniforms, uniform);
}
@ -1365,7 +1365,7 @@ Shader* lovrShaderCreate(const char* vertexSource, const char* fragmentSource) {
glGetActiveUniformsiv(program, 1, &i, GL_UNIFORM_MATRIX_STRIDE, &matrixStride);
uniform.size = uniform.components * matrixStride;
} else {
uniform.size = uniform.components > 1 ? 16 : 4;
uniform.size = 4 * (uniform.components == 3 ? 4 : uniform.components);
}
vec_push(&block->uniforms, uniform);
continue;