Can Three.js accurately display certain WebGL extensions?

On a recent Samsung OS build (I'm testing a Galaxy S6), Chrome is disabling WebGL. The reason for this is documented here . I am using Chrome without blacklist using this flag:

--ignore-gpu-blacklist

enter image description here

These are the errors that Three.js throws out. I'm curious to see if Three.js can execute / execute successfully 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 do I change the three .js so that it might work? If not, where can I read these extensions further so that I can better understand how they work?

+3


source to share


1 answer


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 filtering nearest neighbor.
  • 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 it is based on OES_texture_float_linear

) in the OpenGL ES Registry.

Three.js checks these extensions (and displays error messages as needed) to ensure their functionality.


The latter extension (called EXT_texture_filter_anisotropic

) provides support for anisotropic filtering, which can provide better quality when filtering certain types of textures.



Registry: https://www.khronos.org/registry/gles/extensions/EXT/texture_filter_anisotropic.txt

This page includes a visualization of this filtering.

Here also, Three.js tests this extension to see if it can be used.


For all of these extensions, it depends on your application whether it makes sense to "go about changing Three.js". For example, does your application require floating point textures for some of its effects? (You can check what by checking if you are using THREE.HalfFloatType

or THREE.FloatType

.)

While Three.JS validates these extensions, it does not inherently rely on these extensions to work, and only at least one example requires them to be used. So the problem isn't so much modifying Three.js as modifying your application. However, here at WebGLExtensions.js is where the warning is thrown .

+2


source







All Articles