Platform/GFX/OpenGL Surprises

From MozillaWiki
< Platform‎ | GFX
Jump to: navigation, search

Floating-point Renderability

This stuff is a mess.

OES_texture_float and OES_texture_half_float

(spec document) (both are defined in the same document)

Written against ES2.

Allows specification of textures with a format/type of {RGB,RGBA,LUMINANCE,ALPHA,LUMINANCE_ALPHA}/{FLOAT,HALF_FLOAT_OES}. Only NEAREST-based filter modes are supported. (OES_texture_[half_]float_linear allows LINEAR filtering)

EXT_color_buffer_half_float

(spec document)

Written against ES2.

EXT_color_buffer_float

(spec document)

Written against ES3.

It's tempting to think of EXT_color_buffer_float as the float32 equivalent of EXT_color_buffer_half_float, but this is untrue! EXT_color_buffer_float is the ES3 extension that allows both float16 and float32 rendering.

DrawBuffer

WebGL1 with the drawbuffer extension allows access to gl_FragData in GLSLES1 shaders, but WebGL2 requires a GLSLES3 shader version in order to use gl_FragData.