giordi

05-17-2016, 08:32 AM

Hi folks! I did not write in the forum for a while! But I got a question now.

In my skinning shader I am using a uniform buffer for the matrices instead of a texture. It works great. Then I queried the maximum uniform side and got:

long long int value;

glGetInteger64v(GL_MAX_VERTEX_UNIFORM_COMPONENTS_A RB, &value);

Output was 4096 on both a gtx 960 and 980, which is also confirmed by NSight. This means 4096 / 16 i should get 256 matrices in. If y try to set 256 in the shader i get compiler error (from compiling the shader not the c++), saying i got out of range and stuff, if needed I can post the full compiling error. Although I can successifully use a size up to 253. Any reason for this 3 missing matrices? (Happens on both 960 and 980).

Here is how i do it in the shader:

const int MAX_BONES = 253;

uniform mat4 mat_bones[MAX_BONES];

Any idea? Thanks a lot folks

M.

In my skinning shader I am using a uniform buffer for the matrices instead of a texture. It works great. Then I queried the maximum uniform side and got:

long long int value;

glGetInteger64v(GL_MAX_VERTEX_UNIFORM_COMPONENTS_A RB, &value);

Output was 4096 on both a gtx 960 and 980, which is also confirmed by NSight. This means 4096 / 16 i should get 256 matrices in. If y try to set 256 in the shader i get compiler error (from compiling the shader not the c++), saying i got out of range and stuff, if needed I can post the full compiling error. Although I can successifully use a size up to 253. Any reason for this 3 missing matrices? (Happens on both 960 and 980).

Here is how i do it in the shader:

const int MAX_BONES = 253;

uniform mat4 mat_bones[MAX_BONES];

Any idea? Thanks a lot folks

M.