Hi,

On Mon, 2011-03-14 at 09:44 +0200, J.P. Delport wrote:
> Hi,
> 
> you can try explicitly setting the texture filter, e.g.
> 
> OutTex->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR);
> OutTex->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR);
> 
> and leave out any mipmap settings.

Thanks!

Setting NEAREST filtering definitely helps with the problem.

I'm concerned that my colour scale, which is 256 floating point numbers,
might be being minified so my shader program can only access say 8
floating point numbers (even using NEAREST) when I zoom out.

I want to be sure that the camera position doesn't affect the data my
shader program sees when it accesses textures I'm sharing with it.

> On 14/03/11 08:56, Grahame Bowland wrote:
> > Hi everyone
> >
> > I'm using GLSL shaders with OpenSceneGraph for some scientific
> > visualisation. I've got sample values in a n*m floating point texture,
> > and a colour lookup table in a 1-D texture.
> >
> > I'm sticking those textures on a osg::TexturedQuadGeometry like this:
> > state->setTextureAttributeAndModes(texnum_red, red_texture, 
> > osg::StateAttribute::OFF);
> > state->setTextureAttributeAndModes(texnum_green, green_texture, 
> > osg::StateAttribute::OFF);
> > state->setTextureAttributeAndModes(texnum_blue, blue_texture, 
> > osg::StateAttribute::OFF);
> > state->setTextureAttributeAndModes(texnum_seismic, seismic_tex, 
> > osg::StateAttribute::OFF);
> 
> why OFF?

I wasn't sure if it mattered - I'm only using the textures as input data
to the shader program and not intending them to be displayed on the
plane.

Thanks for the information.

Cheers
Grahame

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to