iDevGames Forums
How many uniform vectors can iPad PowerVR SGX support - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: How many uniform vectors can iPad PowerVR SGX support (/thread-8047.html)

How many uniform vectors can iPad PowerVR SGX support - linghuye - Aug 30, 2010 02:40 AM

1.The Apple's <OpenGLES Programming Guide> say vertex shader has 128 uniform vectors.
2.The PowerVR's <PowerVR SGX OpenGLES 2.0 Application Development Recommandation> say it has up to 512 uniform vectors.
3.I use glGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS) in simulator and iPad Device, and it return 128.
4.But I write

mat4 matModelViewProj;
vec4 BoneMatrix[256];

in my vertex shader, and it compile and link and work successfully on simulator and iPad Device, the uniform location for matModelViewProj returned from glGetUniformLocation is 256!!! And I can increase this value(256) to 768, and it still working. When increasing to 1024, the glLinkProgram crashed.
5.And the GPU Skinning vertex shader performance is very slow, with ths same FPS as CPU Skinning.
6.I found the 'Real Character Demo' in PowerVR Insider Demos, say it can support 42 bones, so 42 * 3 = 126 vectors, so only 2 uniform vectors left for normal transform and lighting, it can not be possible if there is only 128 vectors in SGX.

I am very confused about these, How many uniform vectors can iPad(Real Device) PowerVR SGX support?
The device is iPad wifi 64G, iOS 3.2

Thanks ahead for your reply.