Hi Peterakos, How you would tackle the problem depends upon what your need are for changing the number of uniforms.
In terms of OpenGL objects it's generally best to used fixed size objects so that you don't have to reallocate them. To change the "size" used by the shader one would simply pass in second uniform to control how man samples are used. Robert. On 12 November 2012 19:36, Peterakos <hay...@gmail.com> wrote: > Hello. > > Is there any way to change uniform array size ? > > What i do now is: > > const int num_of_samples = 64; > uniform vec3 sample_kernel[num_of_samples]; > > Can i have num_of_samples as uniform ? > > If not, is it a good idea to have sample_kernel's size as 512 or 1024 > and iterate only num_of_samples ? > > thank you. > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org