Hi,
On 14/03/11 12:27, Grahame Bowland wrote:
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.
OK, nearest means jump to a specific one of your 256 indices. Linear
would interpolate. The number of pixels there are to access would be the
same though as it is only affected by the mip-mapping settings.
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.
Yes, mip-mapping can cause this.
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.
I think they should be bound to be able to access them.
rgds
jp
Thanks for the information.
Cheers
Grahame
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org