Page 1 of 1

textureSize2D vs uniform send

Posted: Tue Aug 07, 2012 8:57 am
by Barnes
For calculate texture lod in the shader we needs know texture size. We can send a uniform or use a function from the GL_EXT_gpu_shader4. But what do we get to the exit? Minus 30 frames per second. But this is not the strongest drop in speed when using the built-in glsl functions. Invert the matrix even slower....

Re: textureSize2D vs uniform send

Posted: Tue Aug 07, 2012 11:44 pm
by mh
I wouldn't invert a matrix in GLSL code. Invert it CPU-side and send the inverted version as a uniform instead. Should fix that.