Sorry for double post, don’t now how to move a topic. Currently i´m entitled for beta tests on a upcoming html5 client for a MMORPG. It looks like all beta testers that use linux with nvidia driver experience the identical issue. (Beta testers with windows + nvidia do not experience this issue)
Myself uses openSUSE 12.3 and the nvidia driver from nvidia FTP server (nvidia-gfxG03-kmp-desktop-310.44_k3.7.10_1.1-11.1.x86_64)
I have some small experience in javascript and debugging, so i´m able to track it down to the function that does fail. However i have very little knowledge about GL or WebGL.
The issue is, the WebGL function getAttribLocation() does return -1 when queried for a float in a shader. I don´t know if this is a general issue when query for float in a shader or some other issue. However here is the shader code:
attribute vec3 _gw;
attribute vec4 _gz;
attribute vec3 _gx;
attribute vec2 _hg;
attribute vec4 _hi;
attribute float _ht;
uniform mat4 _g;
uniform mat4 _e;
uniform mat4 _c;
uniform mat3 _h;
uniform vec3 _m;
uniform vec3 _o;
uniform vec3 _q;
uniform vec3 _r;
uniform vec4 _fn;
uniform float _bh;
varying vec4 _im;
varying vec4 _jv;
varying float _jx;
void main(void) {
gl_Position=_c*_e*_g*vec4(_gw,1.0);
_im=_gz;
_im+=_fn;
vec3 _vn=_h*_gx;
float _ky=dot(_vn,_o);
vec3 _sv=_m+_q*clamp(_ky,0.0,1.0)+_r*clamp(_ky,-1.0,0.0);
_im=vec4(_im.rgb*_sv,_im.a);
_jv.pq=_hi.st;
_jv.st=_hg.st+(_hi.pq/8192.0*_bh);
_jx=_ht;
}
getAttribLocation(this,‘_gw’) → works
getAttribLocation(this,‘_gz’) → works
getAttribLocation(this,‘_gx’) → works
getAttribLocation(this,‘_hg’) → works
getAttribLocation(this,‘_hi’) → works
getAttribLocation(this,‘_ht’) → does not work and returns -1
Is there a issue with the shader or is this a issue with the nvidia driver ? (maybe ‘_ht’ is optimized out for some reason ?)
Thanks for your comments and regards,
Tami