• Advertisement
Sign in to follow this  

GL_LUMINANCE32F_ARB and filtering

This topic is 4306 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a 7800GT and thought I could do bilinear filter with floating point textures? I have a GL_LUMINANCE32F_ARB texture and would like to filter it somewhat rather than GL_NEAREST. Is this possible currently on todays hardware? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Ok, so if I wanted to use the half float e.g. GL_LUMINANCE16F_ARB do I use a unsigned short or a normal float still? I looked around but can't find anything on what data type to use. Thanks

Share this post


Link to post
Share on other sites
The format of the texture buffer in which you provide the data can still be float. Thats why you have to tell OpenGL, what kind of data your buffer holds, when you define the texture. OpenGL will convert it properly to save it internaly. The glTexImage2d for you could look like this:

glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE16F_ARB, width, height, 0, GL_LUMINANCE, GL_FLOAT, buffer);

greetz
rapunzel

Share this post


Link to post
Share on other sites
Of course you could still do the filtering manually in the fragment shader. Not that this is going to be blazingly fast compared to direct hardware filtering, but it might be an option to consider.

Share this post


Link to post
Share on other sites
Quote:
Original post by Yann L
Of course you could still do the filtering manually in the fragment shader. Not that this is going to be blazingly fast compared to direct hardware filtering, but it might be an option to consider.


Hey YannL I thought about it but as is my shader is doing a lot of work already... So I would like to do it in hardware first if I can. :) BTW are you still working with OpenGL or moved onto DX? Haven't seen you around lately? Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement