[osg-users] Vertex texture fetch in r600+ ATI cards
marko_srebre at t-2.net
Fri Jul 18 10:43:17 PDT 2008
This sure was a tough one. It's a weird hack.
To make osgshaderterrain example work on Radeon cards with VTF support,
you have to add something like this to the vertex shader code:
uniform sampler2D baseTexture;
vec4 dummy_lookup = texture2D(baseTexture, texcoord);
Also I get some queer behaviour when using two textures in fragment
program... ati opengl support seems quite buggy and unpredictable.
> This is my first post on the lists; hello to everybody and thanks for
> all the precious info I gathered here in one year of working with
> I have a RadeonHD 3850 card working fine with fglrx driver (8.6) in Linux.
> I have problems running osgshaderterrain example. I get repetitions of
> this error:
> Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)
> The cause of warning is texture2d() lookup in vertex shader, if I remove
> this, the error disappears.
> ATI/AMD claims vertex texture fetch is supported by all ATI hardware
> since r600 (Radeon HD2xxx), so I though at first it may be a driver
> issue. Googling around I found some posts saying the drivers 8.5 should
> support VTF in GLSL, but that may have been about Windows drivers.
> I used the check in osgshaderterrain and queryed
> GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS. It returns 16. As I understand this
> means the vertex fetch should be supported. So what could be the
> problem, the texture format? Besides GL_LUMINANCE_FLOAT32_ATI, I tried
> GL_LUMINANCE32F_ARB and GL_RGBA32F_ARB, with no better results.
> Is this a driver issue/bug? Has anyone managed to run VTF on ATI cards?
> What about Windows users, it would be helpful to know if
> osgshaderterrain runs there, since the drivers (8.5+) supposedly support
> Any hints on where to look for information are most welcome. Thanks.
> osg-users mailing list
> osg-users at lists.openscenegraph.org
More information about the osg-users