You may want to check out http://www.opengl.org/wiki/GLSL_Uniform#Implementation_limits . You can check the uniform limits of your video card with glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, yourReturnVar)
On Fri, Feb 11, 2011 at 4:31 PM, amdlintuxo <[email protected]> wrote: > THE PROBLEM IS SOLVED by decreasing array elements at stage of > declaration in shader from 100 down to 20. > > > > On Feb 12, 1:09 am, Devon Scott-Tunkin <[email protected]> > wrote: > > Thehttp://bpaste.net/show/13617/is not the same because the glsl > compiler > > will usually compile out (make inactive) all of your uniforms since you > > aren't referencing them in the shader. I often find this very annoying > for > > testing. > All time forgot this, thanks for clarification. > > > I've often had problems with arrays in glsl, and never got them to > > work correctly in os x. You could try using a 1D texture lookup if the > > arrays are the problem. > Unfortunately i don't know how to implement my desires other way, so > for now i will go with arrays, but keep you advice in my mind. > Thanks. > > > > I don't really understand what you are trying to do in your pixel shader, > > you could get rid of all of the else's and just put gl_FragColor at the > end > > of main and it would have the same effect. Your loop just changes the > final > > uv, so in effect you don't even need a for loop because your code will > > always just make the end color by using imax-1. Everything else gets > > overwritten. > I am not strong in programming. First my task was is to get it working > fine, the next stage will optimize code and make it looks better. > The reason i have chose this way - i am not sure if i will stuck in > future and have to change the whole render method(shader) or not. It > happens several times. > Thanks for advices, as now it works as i would expected i will make > shader looks better following you comments and post it here. >
