mirror of https://github.com/bjornbytes/lovr.git
Fix (i)vec3 std140;
This commit is contained in:
parent
75159a7823
commit
66c1f373d3
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue