Sign in to follow this  
Obah

Skinning on the GPU

Recommended Posts

Hi there, I'm working on a school project which is to create a game, I have successfully implemented smooth skinned animation (with the max of 4 bones/joints) I now want to off load some computations to the GPU, my question however is in regards to the best way to send data to the GPU. Right now I was testing using attribute variables but I have a very limited amount of those available (16). Is it bad to send uniform variables over constantly? My new idea was to send all of the bones/joints for each character (~300 matrices) then index them in the vertex shader. Is that too much to be sending over? I guess I'm just looking for a little insight, any help would be appreciated. Thanks!

Share this post


Link to post
Share on other sites
Quote:
Is it bad to send uniform variables over constantly?
yes for peformance its ok to set them once for a whole model but if youre gonna change them every vertice then itll kill framerate,
u need attributes or the built in ones normals/texcoords etc

Share this post


Link to post
Share on other sites
On the issue of uniform variables (specifically textures) with GLSL assuming the source code for a shader stays the same, will the indexes for the textures stay the same? and same for attributes, is it safe to only GetAttribLocation() or wahtever it was once in a program? what about once for the same shader? (as in each time the shader is compiled do the attrib locations change?)

thanks
-Dan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this