Sign in to follow this  

Blooming without shaders....

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this