[Public WebGL] IMPORTANT: Your WebGL floating point texture usage needs to be fixed!!!!
Benoit Jacob
[email protected]
Wed Jun 5 14:26:54 PDT 2013
Pardon my naiveness, but where, under that link, does the answer to my
question lie?
Benoit
On 13-06-05 05:20 PM, Florian Bösch wrote:
> https://github.com/pyalot/webgl-texture-float-extension-shims
>
>
> On Wed, Jun 5, 2013 at 11:07 PM, Benoit Jacob <[email protected]
> <mailto:[email protected]>> wrote:
>
>
> So, we are about to implement this now in Mozilla. Just a question: in
> the current specification, when linear filtering is used without
> OES_texture_float_linear enabled, should the outcome be RGBA=(0,0,0,0)
> texel values as in the case of an incomplete texture?
>
> Benoit
>
> On 13-05-28 06:21 PM, Gregg Tavares wrote:
> > There's was a bug in both Chrome and Firefox which is that the
> > OES_texture_float extension should not have allowed linear
> filtering.
> > That bug has been fixed in Chrome Canary.
> >
> > To use floating point textures with linear filtering you must
> get both
> > the OES_texture_float and OES_texture_float_linear extensions.
> >
> > I suspect this will break the majority of WebGL apps that use
> floating
> > point textures. Fortunately there are not 'that' many and the
> fix is easy.
> >
> > For most of the existing WebGL apps using floating point
> textures you
> > need to do this to get the behavior you were getting previously.
> >
> > ext1 = gl.getExtension("OES_texture_float");
> > ext2 = gl.getExtension("OES_texture_float_linear");
> >
> > Otherwise if OES_texture_float_linear does not exist you can set
> your
> > filtering to NEAREST something like
> >
> > ext1 = gl.getExtension("OES_texture_float");
> > if (!ext1) {
> > alert("no support for floating point textures");
> > return;
> > }
> > ext2 = gl.getExtension("OES_texture_float_linear");
> > float_filtering = ext2 ? gl.LINEAR : gl.NEAREST;
> >
> > ... when using floating point textures
> >
> > gl.texImage2D(,....., gl.FLOAT, ..);
> > gl.texParameter(...., gl.TEXTURE_MIN_FILTER, float_filtering);
> > gl.texParameter(...., gl.TEXTURE_MAG_FILTER, float_filtering);
> >
> >
> > Note: While it's sad this fix broke some apps the apps were already
> > broken as many mobile GPUs support OES_texture_float but not
> > OES_texture_float_linear. This fix makes it possible for an app to
> > tell if a device supports OES_texture_float_linear and take
> > appropriate steps.
> >
> >
>
>
> -----------------------------------------------------------
> You are currently subscribed to [email protected]
> <mailto:[email protected]>.
> To unsubscribe, send an email to [email protected]
> <mailto:[email protected]> with
> the following command in the body of your email:
> unsubscribe public_webgl
> -----------------------------------------------------------
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20130605/a276292b/attachment.html>
More information about the public_webgl
mailing list