View Full Version : ATI and uniform arrays
Hello, we are trying to use Uniform4fvMatrixARB and send in an array of matrices to the vertex shader for skinned animation. On Nvidia cards it works fine but on ATI cards the Uniforms do not appear to be set and it runs extremely slow. We are sending an attribute across to index into this array, ATI seems to have problems with integers so that might also be the problem... anyone have any on what might be happening?
02-13-2005, 10:22 PM
From glsl spec (4.3.4 Attribute):
The attribute qualifier can be used only with the data types float, vec2, vec3, vec4, mat2, mat3, and mat4.
May be someone knows why spec forbids integer/boolean types in attributes? On nvidia it works fine.
02-14-2005, 02:03 AM
Originally posted by Fitz:
On Nvidia cards it works fine but on ATI cards the Uniforms do not appear to be set and it runs extremely slow.You're running into a known bug of ATI's implementation (almost a year old now, which is a little frustrating...). When uniform arrays are used, the compiler somehow manages to exceed the temporary register limit and software rendering is used. You'll see it in the shader program log.
Originally posted by grisha:
May be someone knows why spec forbids integer/boolean types in attributes? On nvidia it works fine.I'm not sure why it isn't allowed, but this is what we do in our skinning shader:
attribute ivec4 BONE_INDICES;
attribute vec4 BONE_INDICES;
#endifOn NV, using vec4 and then casting to integers in the shader compiles to ~10 instructions more than simply using ivec4.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.