Skip to main content
GameDev.net gamedev.net
🔒 Locked

Blooming without shaders....

Started by relsoft Mar 9, 2007 at 3:32 AM 1 replies 800+ views
Original Post
relsoft
relsoft
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!
Hi.
Dragon_Strike
Dragon_Strike
why not render to a FBO and then lower its resolution in steps? should give u sufficent blur... i think
relsoft
relsoft
Nividia Gf2 Mx400? I don't think this card supports it.
Hi.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.