Jump to content
  • Advertisement
Sign in to follow this  

Blooming without shaders....

This topic is 4213 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. I have a really old card that does not support GLSL. I want to do blooming without uploading the texture to system memory and do the blur there. I have a working demo of the HW + SW combo here: Blooming HW + SW But I was told that it's not the way to go (though it runs at full speed on my 750 duron with GF2mx). So I tried to find ways to do blooming using texture offsets and even tried to do it using the texture matrix. The problem with both methods is that it does radial blur and not bloom. Here's my code that does the blurring using texture offsets.
sub Tscreen.draw_glow(byval alpha as GLfloat,byval texture_offs as GLfloat)

	glBlendFunc(GL_ONE, GL_ONE)       
    glBindTexture(GL_TEXTURE_2D, texture_id)
    glColor4f(alpha, alpha, alpha, alpha)
      glTexCoord2f(texture_offs, 1-texture_offs)
      glVertex2f(0, 0)
      glTexCoord2f(texture_offs, texture_offs)
      glVertex2f(0, s_display.h)
      glTexCoord2f(1-texture_offs, texture_offs)
      glVertex2f(s_display.w, s_display.h)
      glTexCoord2f(1-texture_offs, 1-texture_offs)
      glVertex2f(s_display.w, 0)
end sub

The other method is just scaling the texture matrix but it produced the same results. Thanks in advance!

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!