Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 17:57

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 14.09.2010, 13:59 
Offline

Joined: 24.03.2010, 10:17
Posts: 55
We have some rather complex models with around 220 joints.
So I changed the vertSkinning.glsl "uniform vec4 skinMatRows[75*3]" to "uniform vec4 skinMatRows[220*3]"
This works fine on NVIDIA cards (even on 8600M GT on OSX).
But it fails on ATI cards (e.g. HD 5870, Catalyst 10.8, Linux), but there is no compile or link status error in the log, it simply renders nothing.
I think we run out of uniforms on ATI cards: the MAX_VERTEX_UNIFORM_COMPONENTS seems to be 1024 in contrast to NVIDIA's 4096.
So the questions are:
1. Why is there no error in log? Driver bug or do we miss some diagnosis output?
2. Is this low limit normal?
3. Any workarounds besides software skinning?
4. Could we solve it with the GL_ARB_uniform_buffer_object extension? The data size limit here is 64k on HD 5870.
Any thoughts?
Thanks in advance.
Alex


Top
 Profile  
Reply with quote  
PostPosted: 14.09.2010, 19:25 
Offline

Joined: 15.06.2008, 11:21
Posts: 166
Location: Germany
1. This should definately trigger a linker error afaik. I've not much experience there though.
2. I thought MAX_VERTEX_UNIFORM_COMPONENTS on ATI refers to vec4s (4d vs 1d shader units, they can at most have 1024 floats, but as many vec4). Seems I am wrong though, or your shader would not fail.
3. If you only have rotation for your joints, use quaternion-based animation? Only takes two vec4 per joint then (1x position, 1x rotation). Quite some work though.
4. I bet you can.


Top
 Profile  
Reply with quote  
PostPosted: 14.09.2010, 21:03 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
SM4 (d3d 10) cards should actually have 4096 const registers. This is what you see on NV but on ATI maybe you only get them with const/uniform buffers in GL (could also be a bug).

Instead of using uniforms, it is also possible to use textures for skinning (see here for pros and cons).


Top
 Profile  
Reply with quote  
PostPosted: 14.09.2010, 21:29 
Offline

Joined: 24.03.2010, 10:17
Posts: 55
Thank you both for your replies.
Yes, I know according to http://www.opengl.org/wiki/GLSL_Uniform some ATI Driver report the maximum number of vec4 instead of floats (like nvidia).
This would mean: ATI 1024 = NVIDIA 4096.
But unfortunately the shader does not work (no link error, also no validation error), so could really be a driver bug or sth else. I'll keep on searching/testing maybe with a different driver version.
As this is currently a really special case, we may simply switch to SW skinning, performance wise that seems ok (although uniform buffer objects seem very tempting but I am lazy, fearing code merge issue with upcoming horde versions :-)
Thanks marciano for the interesting link.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group