In a recent build of Samsung's OS (I'm testing with a Galaxy S6) Chrome disables WebGL. The reason for this is documented here. I'm running Chrome without the blacklist using this flag:
--ignore-gpu-blacklist
These are the errors that Three.js spits out at me. I'm curious to know if Three.js can successfully run/render if these OES extensions don't exist:
OES_texture_float
OES_texture_float_linear
OES_texture_half_float
OES_texture_half_float_linear
OES_texture_filter_anisotropic
If so, how would I go about altering Three.js so that this could work? If not, where can I read up further on these extensions so I can get a better understanding of how they work?
All five of these extensions deal with textures in the following ways:
The first four extensions support floating-point textures, that is, textures whose components are floating-point values.
OES_texture_float
means 32-bit floating point textures with nearest-neighbor
filtering.OES_texture_float_linear
means 32-bit floating point textures with linear
filtering.OES_texture_half_float
means 16-bit floating point textures with nearest-neighbor
filtering.OES_texture_half_float_linear
means 16-bit floating point textures with linear
filtering.See texture_float,
texture_float_linear,
and ARB_texture_float
(which OES_texture_float_linear
is based on)
in the OpenGL ES Registry.
Three.js checks for these extensions (and outputs error messages if necessary) in order to enable their functionality.
The last extension (called EXT_texture_filter_anisotropic
) provides support for anisotropic filtering, which can provide better quality
when filtering some kinds of textures.
Registry: https://www.khronos.org/registry/gles/extensions/EXT/texture_filter_anisotropic.txt
This page includes a visualization of this filtering.
Here too, Three.js checks for this extension to see if it can be used.
For all these extensions, it depends on your application
whether it makes sense to "go about altering Three.js". For instance,
does your application require floating-point textures for some of its effects? (You can check for
that by checking if you use THREE.HalfFloatType
or THREE.FloatType
.)
Although Three.JS checks for these extensions, it doesn't inherently rely on these extensions in order to work, and only at least one example requires their use. Therefore, the issue is not so much to modify Three.js as it is to modify your application. Nonetheless, here, in WebGLExtensions.js, is where the warning is generated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With