[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Proposal for WEBGL_render_to_float

You shan't pour out the baby with the bath. Just because blendColor might be clamped, doesn't mean that blending doesn't work (or would be clamped).

For instance, if you enable blending, and set it to addtive (ONE, ONE), you have an accumulator. If you render to that render target with a floating point texture, this will merrily add unclamped. blendColor doesn't feature in this equation at all. The two most popular blending modes (addtivie and alpha blending) don't consider blendColor. And even if you have an equation configured that does use the blendColor, the result will not be clamped, even though the users specification of the blendColor might be.

On Sun, Feb 22, 2015 at 9:03 AM, Mark Callow <khronos@callow.im> wrote:

On Feb 22, 2015, at 4:06 PM, Florian Bösch <pyalot@gmail.com> wrote:

2) Retrograding features such as blending on floating point textures will lead to massive application breakage.

Making idle assumptions of the kind of "oh that'll be alright, somewhere it was undefined and therefore not much will break if we break it" are dangerous, irresponsible and contra-productive to WebGL. They're extremely contra productive because existing use will break, which is extremely frustrating to both users and developers of WebGL as they will have to address regressions that a browser introduced. This is one of the most destructive actions vendors can take, and they undermine the credibility of WebGL quite a lot.

If any implementation is implicitly exposing fp32 rendering on OpenGL ES 3-class hardware then we have already broken the apps. Similarly if any implementation is exposing fp rendering on both > GL 4.2 and < GL 4.2 we have already broken the apps. Not sure where D3D sits with regards to the clamping.

It would help to sort this mess out if we knew on what hardware classes implementations are implicitly exposing fp rendering and if some or all of that hardware is subject to the clear and blend color clamping problem and to not supporting blending for fp32 or fp16. The latter should only be a problem on D3D9. Both GL_EXT_color_buffer_half_float and GL_EXT_color_buffer_float support fp16 blending.