I’ve been having some trouble with temporary registers - I’m getting errors on compile/link that the program will run in software mode, as too many temprorary registers are used.
The vertex shader in question is for skinning with 4 bone influences, and runs fine in CG on both NVidia and ATI cards:
I’ve tried splitting up all of the matrix multiplies into temp mat4 variables, etc, etc, but can’t seem to fit the shader into the 12 vec4 temporary registers that are available to the ATI card. I haven’t even tried transforming my normal or tangent vectors; just the position vector seems to be too much.
Anyone else run into this problem on your ATI card, and find a solution?
glSlang is still a bit more limited, because the compilers and linkers are not completely ready yet. Therefore it´s possible to run into limits, which are not present with ARB_fp / ARB_vp.
Try updating your driver, Catalyst 4.5 has already increased the amount of usable registers. If that doesn´t help, you either have to wait for a driver, which supports more, or you have to use ARB_vp for now.
I got a similar problem when using ints on ATI R3xx hardware. When I commented out all lines where I use ints it worked for me.
I don’t know if this is a hardware limitation or just a GLSL compiler limitation.
Just heard back from ATI devrel. It’s a “current driver issue”:
“I’ve checked this out with our OpenGL team, and they say that this is a known issue with the current GLSL driver. Using an array of uniforms will cause over use of resources. This is something that will be fixed in an upcoming driver release.”
Hopefully this will be fixed in the next Catalyst package - it’s a pretty big limitation…
Sorry to bump old topics… Just thought I’d mention that the issue seems to still be there in full force.
I have a very similar skinning shader right now to the one posted above and with 3 weights it works but adding in the 4th weight exceeds temp registers.
Kind of sad that it has been 2 months and it is still there.
P.S. This is on an ATI mobility radeon 9700 running the omegas based off the cat 4.8 drivers.
Yes, the problem is basicly fixed around 5.8 and skinning now works in quite complicated setups (like 3*2 bones skinned shadow volume extrusion).
However skinning still makes it pretty sensitive to other problems, especially even simple conditionals.
I’m pretty sure it’ll work if you replace the if with a diffuse= max(diffuse,0.125)