I'm using Mali 400mp for doing some mathmetic computing.But the result is not satisfying.
In my program, I put a float array A by using gluniforlfv() into the shader,and put a Image Texture B by using glTexImage2D() into the shader,use the values in A and values in B to do mathmatic computing.
I use Mali's parameter to se OpenGL ES2.0 environment:
protected int redSize = 8;
protected int greenSize = 8;
protected int blueSize = 8;
protected int alphaSize = 8;
protected int depthSize = 16;
protected int sampleSize = 4;
protected int stencilSize = 0;
The txture parameter is:
........
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texwidth, texheight, 0, GL_RGBA, GL_UNSIGNED_BYTE, Data);
The problem is :
Firstly, when I use gluniformlfv() to put a float array into the shader, the value in shader for computing is not the same as its real value.For example, if the value is 0.123456, however, in shader, the value is bigger or smaller in fact .So as other values.
Secondly, When I doing some computing in shader, it seems the result is not right for addition ,division etc. The result has some difference with the idealized mathmatic computing. I don't know why.
http://www.khronos.org/registry/gles/specs/3.0/GLSL_ES_Specification_3.00.4.pdf section 4.5 here details the requirements for different precision levels in GLSL ES, expecting any more is outside of the spec and is not guaranteed to work on every conformant implementation. There might also be some information in the GL ES spec itself.
Hope this helps,
Chris