Jump to content
  • Advertisement
Sign in to follow this  
dimensionX

Floating point textures and GLSL shaders

This topic is 4776 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 had created a floating point texture as follows: glBindTexture(GL_TEXTURE_RECTANGLE_ARB, backEllipseCoeffsTexture); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, wds.cols, wds.rows, 0, GL_RGBA, GL_FLOAT, backEllipseCoeffs); Now inside GLSL fragment program, using the below statement terribly slows down the fragment program compilation and loading. Also it gives me crappy values. vec4 coeffs = texture2DRect(EllipseCoeffs, vec2(U, V)); If I comment this statement everything is very fast. I tried with 8-bit fixed point textures without any problem. EllipseCoeffs is declared as follows: uniform sampler2DRect EllipseCoeffs; Any comments would be helpful!

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!