On Fri, Jan 30, 2015 at 12:48 AM, Alecazam <
al...@figma.com> wrote:
> This appears to have been omitted from the ES2/3/3.1/WebGL 2 spec.
> GL_RGBA16 was filterable, has high precision, and fed in nicely to floating
> point samplers.
>
> I found RGBA16ui in the ES3/WebGL2 spec, but none of these integer formats
> are filterable. The whole point of a 16-bit format is to provide higher
> precision than 16f, but do filtering in as few ops as possible. Desktop has
> had this since GL 1.1. If you have to do 8 ops for trilinear mips, then the
> integer formats seem rather costly and unusable. I know that mobile devices
> like Tegra had a 16f pixel shader, but surely the newer hardware has enough
> precision to handle GL_RGBA16. There are plenty of image formats where
> higher precision is desirable (RAW, PNG, PSD, others).
Thanks for raising this issue. After a little searching I found this
OpenGL ES extension:
https://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_norm16.txt
It's recent, and written against the OpenGL ES 3.1 spec. I don't know
whether devices that support e.g. ES 3.0 might be able or allowed to
expose this extension.
There must be some reason this isn't in the core spec, but I don't
know what it might be. We could consider exposing it as an extension
to WebGL. It would be good to first gather information about what
devices support it. Since it's so recent, it's unlikely any shipping
mobile devices do. The downside to exposing this as an extension is
that if your app is written assuming it's present, it won't be
portable.
> Also R32f was commonly used with desktop, but fails in WebGL 1.
This format will come along with many others in WebGL 2.0. Please use
RGBA/FLOAT textures for now in conjunction with WebGL's exposure of
the OES_texture_float extension.
> I'm
> encouraged to see EXT_SRGB support everywhere now, but it feels like
> exposing some of these desktop formats (an extension per format?) is
> warranted.
Please check the OpenGL ES extension registry at
https://www.khronos.org/registry/gles/ and see if there are other
extensions providing similar functionality that might be older and
more widely supported.
Please feel free to propose exposing specific extensions on
public_webgl -- or submit pull requests to
https://github.com/KhronosGroup/WebGL adding proposals.
-Ken
> --
> You received this message because you are subscribed to the Google Groups
> "WebGL Dev List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
webgl-dev-lis...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.