Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualwintertime

Posted 03 February 2013 - 10:23 AM

I think the blue border is not from texture filtering but from combining the half transparent pixels with the blue background pixel thats already in the framebuffer. Then its written back into the framebuffer and the depth of the sprite is put into the depth buffer so it blocks the later drawing of the wall. You need to change the alpha to 1 for all pixels you dont discard inside the fragmentshader to prevent this.
A more exact method would be draw everything back to front and only discard pixels with alpha==0. Or clear framebuffer to black not blue, draw front to back, discard everything with apha!=1 to make use of the depth buffer for solid objects, then draw anything thats transparent back to front and this time discard alpha==0 and alpha==1.

#3wintertime

Posted 03 February 2013 - 10:21 AM

I think the blue border is not from texture filtering but from combining the half transparent pixels with the blue background pixel thats already in the framebuffer. Then its written back into the framebuffer and the depth of the sprite is put into the depth buffer so it blocks the later drawing of the wall. You need to change the alpha to 1 for all pixels you dont discard inside the fragmentshader to prevent this.
A more exact method would be draw everything back to front and only discard pixels with alpha==0. Or clear framebuffer to black not blue, drawn front to back, discard everything with apha!=1 to make use of the depth buffer for solid objects, then draw anything thats transparent back to front and this time discard alpha==0 and alpha==1.

#2wintertime

Posted 03 February 2013 - 10:21 AM

I think the blue border is not from texture filtering but from combining the half transparent pixels with the blue background pixel thats already in the framebuffer. Then its written back into the framebuffer and the depth of the sprite is put into the depth buffer so it blocks the later drawing of the wall. You need to change the alpha to 1 for all pixels you dont discard in the fragmentshader to prevent this.
A more exact method would be draw everything back to front and only discard pixels with alpha==0. Or clear framebuffer to black not blue, drawn front to back, discard everything with apha!=1 to make use of the depth buffer for solid objects, then draw anything thats transparent back to front and this time discard alpha==0 and alpha==1.

#1wintertime

Posted 03 February 2013 - 10:20 AM

I think the blue border is not from texture filtering but from combining the half transparent pixels with the blue background pixel thats already in the framebuffer. Then its wirtten back into the framebuffer and the depth of the sprite is put into the depth buffer so it blocks the later drawing of the wall. You need to change the alpha to 1 for all pixels you dont discard in the fragmentshader to prevent this.

A more exact method would be draw everything back to front and only discard pixels with alpha==0. Or clear framebuffer to black not blue, drawn front to back, discard everything with apha!=1 to make use of the depth buffer for solid objects, then draw anything thats transparent back to front and this time discard alpha==0 and alpha==1.


PARTNERS