Hi Jonathan,

Last time I used float textures with OpenSG it was this way:
On Nvidia graphics boards, you had to use rectangular (non-power-of-two)
textures, where you indeed have to access the texture by direct indexing
(i.e. a value in [0,texture_width]).
On ATI graphics boards, you can use floating point values with all
textures (2D, 3D, Cube) and indexing is as usual. Here, you have to have
a power-of-two texture as usual.

On both platforms, interpolation was not possible.

The newest Nvidia graphics boards feature interpolation of floating
point textures: full speed for 16 bit floats and at a much slower speed
(emulation?) for 32 bit floats. Therefore, If you have such a board
available, I recommend the 16 bit floats since they are sufficient for
most cases anyways.

For the use of the texture: depending on your graphics card and its
capabilities, you will have to set the min/mag filter to no
interpolation (nearest neighbor).

Good luck with the feature. The results are very rewarding in many
cases.
Hopefully, my comments aren't outdated by new graphics cards features
already ;-)

Best regards,
Jan

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Jonathan Bard
> Sent: Freitag, 8. April 2005 16:29
> To: [email protected]
> Subject: [Opensg-users] 32 bits textures
> 
> 
> 
> 
> Hi everyone,
> I'm back for a new question. This time it's about 32 bits 
> textures. I would like to use this kind of texture in a GLSL 
> shader, within OpenSG, of course. Juste before spending my 
> time on it, I would like to have a precision. I read 
> somewhere that 32bits textures don't work the same way than 
> others in regard to interpolation. So, in the shader, must 
> the sampler provide the index of the pixel it wants to 
> access, rather than a float between 0 and 1, that indicates 
> in a relative way the pixel in the image? Is it really how 
> you access a 32 bits texture pixel, by specifying the 
> absolute location in the texture?
> 
> Another thing : given that interpolation in the classic 
> texture access works with power of 2, is it necessary, in the 
> case of 32 bits textures where there's no interpolation, to 
> provide a power of 2 - sized texture?
> 
> Well, that's my questions. From a previous post, I think I 
> understood that you just have to provide the pixel type 
> Image::OSG_FLOAT32_IMAGEDATA and to cast the float array into 
> a UInt8 array, in order to create such an image. Tell me if 
> there's something else I must do (for example, is it 
> necessary to choose a particular type of Min/Mag Filteer in 
> the TextureChunk?).
> 
> Thanks!
> 
> Jo
> 
> 
> -------------------------------------------------------
> 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_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to