Christian,
Thanks a lot for the example code.  It appears you are using an
internal format of GL_FLOAT_RGBA32_NV and a texture target of
GL_TEXTURE_RECTANGLE_NV.  I was trying to use GL_TEXTURE_2D.  Now that
I look, I see the spec for NV_float_buffer states "floating-point
texture maps must be 2D, and must use the NV_texture_rectangle
extension."  Argggg!

Anyway, I have found another suitable solution to my particular
problem by using an internal format of GL_LUMINANCE16, which works
fine with GL_TEXTURE_2D.  As for the clamping to {0,1}, I think I'll
just have to pass a scalar to my shader by which to multiply the
texture values.
-- 
Terry Welsh - mogumbo 'at' gmail.com
www.reallyslick.com  |  www.infiscape.com  |  www.vrsource.org

On 4/24/05, Christian Lessig <[EMAIL PROTECTED]> wrote:
> Hi Terry,
> 
> I attached a small example program which works for me. Maybe you should
> compare the parameter (the relevant things are in the
> 'createTextureChunk()' function).
> 
> Regards,
> Christian
> 
> Terry Welsh wrote:
> 
> >I tried a bunch of them:  GL_LUMINANCE, GL_FLOAT, GL_FLOAT_R32_NV
> >(this one I hoped would work but it comes out black),
> >GL_FLOAT_RGBA32_NV, and a few others I can't remember right now.  I'm
> >using an NVidia 6800GT on Fedora Core 2.
> >
> >On 4/24/05, Christian Lessig <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Hi Terry,
> >>
> >>what internalFormats did you tried and what graphics boards are you using?
> >>
> >>Regards,
> >>Christian
> >>
> >>Terry Welsh wrote:
> >>
> >>
> >>
> >>>I'm trying to use a floating point texture in a GLSL program.  My
> >>>image is set up like this:
> >>>
> >>>mImage->set(Image::OSG_L_PF, 512, 512, 1, -1, 0, 0.0, (UInt8*)data,
> >>>Image::OSG_FLOAT32_IMAGEDATA);
> >>>
> >>>where data is actually of type Real32*.  When these texture values
> >>>come into my shader, they appear to have been clamped to the range
> >>>{0,1}.  I have experimented with TextureChunk::setInternalFormat with
> >>>no luck.  My texture either stays within {0,1} or comes out black.
> >>>Anybody know how to get around this problem?
> >>>
> >>>
> >>>
> >>>
> >>-------------------------------------------------------
> >>SF email is sponsored by - The IT Product Guide
> >>Read honest & candid reviews on hundreds of IT Products from real users.
> >>Discover which products truly live up to the hype. Start reading now.
> >>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> >>_______________________________________________
> >>Opensg-users mailing list
> >>[email protected]
> >>https://lists.sourceforge.net/lists/listinfo/opensg-users
> >>
> >>
> >
> >
> >-------------------------------------------------------
> >SF email is sponsored by - The IT Product Guide
> >Read honest & candid reviews on hundreds of IT Products from real users.
> >Discover which products truly live up to the hype. Start reading now.
> >http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
> >_______________________________________________
> >Opensg-users mailing list
> >[email protected]
> >https://lists.sourceforge.net/lists/listinfo/opensg-users
> >


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&opÿick
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to