Jump to content
  • Advertisement
Sign in to follow this  
relsoft

Blooming without shaders....

This topic is 4125 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)
	glEnable(GL_BLEND)

	glBlendFunc(GL_ONE, GL_ONE)       
    
    glEnable(GL_TEXTURE_2D)
    glBindTexture(GL_TEXTURE_2D, texture_id)
    this.view_ortho
    glColor4f(alpha, alpha, alpha, alpha)
    glBegin(GL_QUADS)
      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)
    glEnd()
    this.view_perspective
    glDisable(GL_TEXTURE_2D)
    glDisable(GL_BLEND)
    
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
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!