Skip to main content
1 of 2
Simon F
  • 4.3k
  • 13
  • 30

Having read Paulhk's answer, it occurred to me that a possible alternative to the 'bleed', based on premultiplied alpha, would be to initialise your unfilled area to transparent black rather than opaque green.

When you then perform the bilinear filtering, if the returned alpha is non-zero (not sure if this test is necessary or not as I can't remember the specifics of the shader rcp() function), multiply the returned filtered (premultiplied) RGB components by the reciprocal of the alpha component to get back a more appropriate colour.

I would hope the alpha is non-zero, but there may be inaccuracies in the pipeline so you might need to special case it.

Simon F
  • 4.3k
  • 13
  • 30