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
Blooming without shaders....
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.
The other method is just scaling the texture matrix but it produced the same results.
Thanks in advance!
why not render to a FBO and then lower its resolution in steps? should give u sufficent blur... i think
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement