Numerical Instability Causes Crash in iOS OpenGL ES 3.0 Vertex Shader, Shader Language Version 300 -
Numerical Instability Causes Crash in iOS OpenGL ES 3.0 Vertex Shader, Shader Language Version 300 -
i doing block matrix inversion of 6x6 matrix, split 4x4, 2x4, 4x2 , 2x2 block, somewhere along way goes wrong , attempting access 1 of values causes crash. thought seek using isnan() or isinf() observe bad value, appears cause crash well.
// pieces of block matrix inversion: mat4 inva = inverse(a); mat2 invd = inverse(d); mat4 schura = - b*invd*c; mat2 schurd = d - c*inva*b; mat2x4 upperr = -inva*b*schurd; mat4x2 lowerl = -invd*c*schura; // set outgoing color vertex yellowish: v_pcolormarker = vec3(0.90, 1.00, 0.60); // not crash, seems can multiply these matrix values: vec2 p45 = vec2(0.0); p45 += lowerl*b0123 + schurd*b45; float temp = schurd[0][1]; // checking matrix entry nan causes crash ????!!!! if (isnan(temp)) { // set vertex color i’ll able see , detect: v_pcolormarker = vec3(0.0, 1.0, 0.0); }
any ideas? not sure how debug since crash happening in vertex shader , not have way inspect values within of matrix. possible value @ [0][1] in matrix non-numeric value of description different nan of inf , crash both isnan() , isinf()?
this ended beingness unrelated problem, "instabilities" coming using many addresses , causing gpu/compiler either recycle or lose track of values in particular addresses. refactoring code more address efficient cause instability go away.
ios opengl-es vertex-shader opengl-es-3.0
Comments
Post a Comment