[osg-users] problem using uniform arrays
Roni Rosenzweig
roniros at gmail.com
Mon Feb 4 11:35:57 PST 2008
Hi Mike
I may have narrowed down the problem. It's not so much the arrays that are
causing problems, but their usage.
For example indexing an array like this:
arr[ind]
works fine for the vertex shader, but doesn't compile on the fragment
shader, saying that the index has to be constant, so that arr[ind] is not
allowed, but arr[3] is ok.
However, since I'm using long arrays (70 elements), I don't know how to work
around this limitation.
Any ideas?
Notice that this error only happens on 7800, not on 8800.
Also, even though I changed the osg notification level to debug, I get no
error/warning messages when compiling and linking the shader. Don't know why
... (I used another glsl debugger to get the error messages)
Roni
----- Original Message -----
From: "Mike Weiblen" <mweiblen at zebraimaging.com>
To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
Sent: Monday, February 04, 2008 8:57 PM
Subject: Re: [osg-users] problem using uniform arrays
> Hi Roni,
> See below
>
> > -----Original Message-----
> > From: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-
> > bounces at lists.openscenegraph.org] On Behalf Of Roni Rosenzweig
> > Sent: Monday, February 04, 2008 1:18 AM
> > To: OpenSceneGraph Users
> > Subject: [osg-users] problem using uniform arrays
> >
> > Hello
> > I'm using uniform arrays in my glsl shader. On geforce 8800 it works
> > great, but on 7800 doesn't work (converts to fixed shader).
> > when I try to validate my shader code I get a "GL_3DL_array_objects
> > extension is disabled" error.
>
> Assuming you used 3Dlabs' GLSLvalidate tool which, as you can see, is
> only helpful up to a point.
>
> > Are uniform arrays not supported on geforce 7800?
>
> No idea. Array support often a driver issue, but could require some
> hardware capability. Are both GPUs running exactly the same driver?
>
> It would be most helpful to see the actual error messages generated
> during OSG's attempt to compile/link the shader code (eg perhaps you in
> fact have a bug completely unrelated to arrays) When you increase the
> OSG_NOTIFY_LEVEL, it will print out the compile/link InfoLogs containing
> diagnostic info. What are those messages?
>
> Cut down your shader code to a bare minimum example that works on 8800
> but fails on 7800. That repro case should probably be no more than a
> couple lines.
>
> Hth
> -- mew
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
More information about the osg-users
mailing list