Make bone IDs unsigned for WebGL;

This commit is contained in:
bjorn 2019-02-14 09:45:29 -08:00
parent 912dec3c78
commit 1d3b05a515
2 changed files with 2 additions and 2 deletions

View File

@ -1877,7 +1877,7 @@ Shader* lovrShaderInitGraphics(Shader* shader, const char* vertexSource, const c
// Generic attributes
lovrGpuUseProgram(program);
glVertexAttrib4fv(LOVR_SHADER_VERTEX_COLOR, (float[4]) { 1., 1., 1., 1. });
glVertexAttribI4iv(LOVR_SHADER_BONES, (int[4]) { 0., 0., 0., 0. });
glVertexAttribI4uiv(LOVR_SHADER_BONES, (uint32_t[4]) { 0., 0., 0., 0. });
glVertexAttrib4fv(LOVR_SHADER_BONE_WEIGHTS, (float[4]) { 1., 0., 0., 0. });
lovrShaderSetupUniforms(shader);

View File

@ -20,7 +20,7 @@ const char* lovrShaderVertexPrefix = ""
"in vec2 lovrTexCoord; \n"
"in vec4 lovrVertexColor; \n"
"in vec3 lovrTangent; \n"
"in ivec4 lovrBones; \n"
"in uvec4 lovrBones; \n"
"in vec4 lovrBoneWeights; \n"
"in uint lovrDrawID; \n"
"out vec2 texCoord; \n"