//nvm, got it... no \n are read with my file read function
//nvm, got it... no \n are read with my file read function
Have you considered inverting the matrix on the CPU and passing that as a uniform? If your matrix is not modified per-vertex or per-fragment, this could provide a significant speed gain.
The GLSL compiler could do this automatically if it detects that only uniforms are used as input to the "invert" function, but I don't know if it does. I am still using GLSL 1.20 so I don't have this function.
Yep, it's a long shot but it could be he's hinting at the compiler optimization trick that's documented in the DX-files - the so-called "pre-shader": the compiler factors out "batch constant" expressions involving uniforms and hoists them up into their own shader to be run as a sort of "batch preprocess" on the CPU. It's an "effect" thing, but in a perfect world it could probably be a shader thing too. ;-)
What should be done to solve this issue ???
My experiences with the glsl invert function were not good. It did not seem to give a very accurate invert matrix.Have you considered inverting the matrix on the CPU and passing that as a uniform?