Jump to content
  • Advertisement
Sign in to follow this  
hy

OpenGL Rendering floating point lightmaps in OpenGL?

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

Hi, you guys. I have generated lightmaps for every polygon in my scene. The lightmaps are stored in 32 bit floating point values. Now I'm wondering how can I render the geometries with the lightmaps into a floating point texture by using the frame buffer object. Can I just call glTexImage2D (GL_TEXUTRE_2D,0,GL_RGB16F, width, height, 0, GL_RGB, GL_FLOAT, Data); and pass the floating point data directly to the hardware? Or should I convert the floating point values on the CPU and pass the converted half floats to the function? If I need to convert the floating point values myself, how is that done? And how to make OpenGL not to clamp the values into [0,1] ? Thank you very much. [Edited by - hy on November 4, 2007 11:35:18 PM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Can I just call glTexImage2D (GL_TEXUTRE_2D,0,GL_RGB16F, width, height, 0, GL_RGB, GL_FLOAT, Data); and pass the floating point data directly to the hardware

Yup. Let the GL do the work. I don't think the values you pass will be clamped but I'm not 100% sure what the spec says.

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!