Jump to content
  • Advertisement
Sign in to follow this  
mrbig

Floating Point Textures

This topic is 4610 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

Advertisement
Nobody is entirely sure.

The Valve guys mentioned something about having to do each skybox 4 times, which suggests that each channel of the sky is a seperate image which is then assembled into an FP format at runtime. I don't know of any tools that allow you to edit floating point textures directly, which is unfortunate.

Share this post


Link to post
Share on other sites
Nooo, how do I create them in OpenGL, so I could render the HDR portions of the image on them?

[EDIT]

I think it can be done using 'glTexImage2D', 'glCopyTexImage2D' and 'GL_RGB16F_ARB'.
I'm trying to figure it out right now.

Share this post


Link to post
Share on other sites

float *data = new float[Width * Height * 4];

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, Width, Height, 0, GL_RGBA, GL_FLOAT, data);



That should work

Share this post


Link to post
Share on other sites
Quote:
Original post by Code-R
isn't 32f overkill?
No. (Hint: Read about High Dynamic Range (HDR) rendering.)

If you mean he could use 16F instead of 32F, then I guess it's all just down to your needs.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
Original post by Code-R
isn't 32f overkill?
No. (Hint: Read about High Dynamic Range (HDR) rendering.)

If you mean he could use 16F instead of 32F, then I guess it's all just down to your needs.


Ditto :)

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!