4 ms·
Is it not possible to use a different operator for alpha blending? So instead of a1 + a2, do max(a1,a2)?
by rebuilder 5y ago
Is it not possible to use a different operator for alpha blending? So instead of a1 + a2, do max(a1,a2)?
- pcwalton 5y agoIt requires EXT_blend_minmax or WebGL 2, but yes.
- catdawg 5y agoYeah, I had exactly this problem before. I tried to wrap my head around how to actually do it geometrically, but thankfully had the much easier idea of just using the blend op. This is super useful though! You don't always have the ability to change the blending op, or you could be rendering on top of something that might give you artifacts. Thankfully I was rendering something like this on a blank canvas.
- ghusbands 5y agoThat depends on whether you're drawing to a (temporary) buffer with alpha or drawing directly onto a background. Even if you can, it imposes limits on your overall compositing/drawing order.
- GuB-42 5y agoI guess it can be done using stencil buffer trickery too. Using "max" instead of "+" will work, but is will be a different effect.