[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] plugging floating point holes
We largely fixed this:
If OES_texture_float is enabled, you can make 32F textures, and sample from them without filtering.
If OES_texture_float_linear is enabled, 32F textures may be filtered. (sampled from with LINEAR)
if WEBGL_color_buffer_float is enabled, RGBA32F becomes a color-renderable effective internal format for textures and renderbuffers. Also, RGBA/FLOAT supplants RGBA/UNSIGNED_BYTE as the default supported format/type for ReadPixel.
This same pattern works applies to half-floats as well.
Historically, it was pretty poorly specified, but we're in a better state today. Implementations which do not match what I state above are not (I believe) in compliance with the relevant extension specs.
Specification-wise the only wrinkle is that WEBGL_color_buffer_float can’t be used to expose float32 rendering on OpenGL ES 3 devices supporting the native EXT_color_buffer_float, because the former requires that blending of float32 colors be supported and the latter requires they not be. This is a problem because, when I asked within Khronos, only 2 vendors said they could support float32 blending on their OpenGL ES 3.x parts.
I apologize for this wrinkle. When I wrote WEBGL_color_buffer_float my purpose was to provide a way for implementations to expose float32 rendering when running on desktop OpenGL. I, wrongly as it turns out, expected future OpenGL ES implementations to have the same float32 capabilities.
I see 3 ways to fix this:
- Change WEBGL_color_buffer_float to remove support for float32 blending.
- Change WEBGL_color_buffer_float to add a flag that indicates if float32 blending is supported
- Create a new extension, e.g, (horribly long name) WEBGL_color_buffer_float_no_blend
- Modify the WebGL version of EXT_color_buffer_float so that it can be applied to WebGL 1 implementations. I have not looked to see how much work this might be or what damage it might to the understandability of the extension.
1 and 2 are not acceptable by this groups processes as the spec. is already approved.
There is a EXT_float_blend extension in proposals which can be used by WebGL 2 implementations to expose float32 blending and could also be used by WebGL 1 implementations if we choose #1 above. I’d like to propose moving that extension to Drafts so WebGL 2 implementations on desktop can start exposing it.
Description: Message signed with OpenPGP using GPGMail