[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Does WebGL support Blend Equation Extensions ?
It would be great if we could add EXT_blend_minmax support in GLES 2.
Can you please provide sample code or update the jsfiddle to solve this issue using the depth buffer in the following link.
On Thu, Aug 9, 2012 at 10:31 AM, Jeff Gilbert <firstname.lastname@example.org>
This behavior is core in GL 2.0+ and GLES 3, but is not in GLES 2 core. GLES 2 can expose this functionality with EXT_blend_minmax, though. We could potentially expose this, especially if EXT_blend_minmax support happens to be prevalent.
If you aren't doing anything with the depth buffer, you can possibly use that to store your intensity, and rely on depth testing to get you what you want. I'm trying to think of why this might not work, but it seems like it should.
If you need depth test to prevent sprites from appearing behind walls or something, though, it's more complicated. With the depth_texture extension, you should be able to render your main scene first, then in a new rendering pass for the sprites, discard fragments which are behind the depth you sample from the depth texture (which you rendered your previous scene to).