Hi,

My simple fragment shader with textureSize() seem to work fine when dealing 
with a usampler1D uniform (the problem I had at one point was that I was giving 
a texture that was too big for the driver, hence the size ended up being 
actually 1, and my test was always failing).

tex->setInternalFormat(GL_RGBA8);
image->allocateImage((128*128), 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, 1);

In my fragment shader:

uniform usampler1D tex;

My (textureSize(tex, 0) == 16384) test actually does work.

When I change my code so that your TextureBuffer is used, somehow, things don't 
work.

- I change the uniform type from UNSIGNED_INT_SAMPLER_1D to 
UNSIGNED_INT_SAMPLER_BUFFER.
- usampler1D becomes usamplerBuffer, textureSize() becomes textureSizeBuffer().
- and of course I create a TextureBuffer and not a Texture1D object.

In my GL tracer, I don't see any OpenGL error. I am trying hard to see what is 
wrong, but so far, I have no idea.

And yet, things don't work.

Cheers,
Fred

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35866#35866





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

Reply via email to