mournerslament
August 8th, 2007, 10:42 AM
I am currently working on a GLSL vertex shader to put smooth-skinned animation calculations on the gpu.
I had posted about a float to int conversion in GLSL slowing me down from over 660+ fps to less than 20, but it turns out that that is not what is happening.
It seems that when I use an integer index into a uniform array in GLSL, my framerate dies. If I hardcode an integer as the subscript in the array, then I get the 660+ fps going again, but if I even make a local integer and set it equal to that same value that I hard coded, and use that int to index into the array, then my framerate dies again. I am really perplexed at this point. Anyone have any insight into what is going on? We are really relying on this shader to ease the load on the cpu, as we are potentially going to have many smooth-skinned models on screen at a time. Any help would be *greatly appreciated*.
Thanks, guys.
I had posted about a float to int conversion in GLSL slowing me down from over 660+ fps to less than 20, but it turns out that that is not what is happening.
It seems that when I use an integer index into a uniform array in GLSL, my framerate dies. If I hardcode an integer as the subscript in the array, then I get the 660+ fps going again, but if I even make a local integer and set it equal to that same value that I hard coded, and use that int to index into the array, then my framerate dies again. I am really perplexed at this point. Anyone have any insight into what is going on? We are really relying on this shader to ease the load on the cpu, as we are potentially going to have many smooth-skinned models on screen at a time. Any help would be *greatly appreciated*.
Thanks, guys.