glTF model doesn't appear on Three.js examples
See original GitHub issueHardware
Oculus Go
FxR APK file I used is public/FirefoxReality-oculusvr-debug.apk on https://tools.taskcluster.net/groups/Wqqjon9nQoqYx7V8SvVLSQ/tasks/Wqqjon9nQoqYx7V8SvVLSQ/runs/0/artifacts
Steps to Reproduce
- Go to Three.js examples using glTF models on Oculus Go
- https://threejs.org/examples/webgl_animation_keyframes.html
- https://threejs.org/examples/webgl_loader_gltf.html
- https://threejs.org/examples/webgl_loader_gltf_extensions.html
- Confirm glTF model doesn’t appear
Current Behavior
glTF model doesn’t appear.
Expected Behavior
glTF model appears. Oculus Go default browser works fine.
Possible Solution
From the error log below, I guess shader texture LOD extension(EXT_shader_texture_lod) handling seems wrong? I suppose FxR doesn’t support EXT_shader_texture_lod but gl.getExtension( 'EXT_shader_texture_lod' ) returns non-null?
https://github.com/mrdoob/three.js/blob/dev/src/renderers/webgl/WebGLProgram.js#L90
Context
glTF is one of the standard 3D format. If FxR can’t render glTF model (with envMap), many WebVR app couldn’t work.
Error Logs and Stack Traces
09-01 09:04:08.431 29552-29575/org.mozilla.vrbrowser E/GeckoConsole: [JavaScript Error: "THREE.WebGLShader: Shader couldn't compile."]
09-01 09:04:08.441 29552-29575/org.mozilla.vrbrowser W/GeckoConsole: [JavaScript Warning: "THREE.WebGLShader: gl.getShaderInfoLog() fragment WARNING: 0:1: extension 'GL_EXT_shader_texture_lod' is not supported
ERROR: 0:93: 'textureCubeLodEXT' : no matching overloaded function found
ERROR: 0:93: '=' : cannot convert from 'const float' to '4-component vector of float'
ERROR: 2 compilation errors. No code generated.
1: #extension GL_OES_standard_derivatives : enable
2: #extension GL_EXT_shader_texture_lod : enable
3: precision highp float;
4: precision highp int;
5: #define SHADER_NAME MeshStandardMaterial
6: #define STANDARD
7: #define GAMMA_FACTOR 2
8: #define USE_MAP
9: #define USE_ENVMAP
10: #define ENVMAP_TYPE_CUBE
11: #define ENVMAP_MODE_REFLECTION
12: #define ENVMAP_BLENDING_MULTIPLY
13: #define USE_AOMAP
14: #define USE_EMISSIVEMAP
15: #define USE_NORMALMAP
16: #define USE_ROUGHNESSMAP
17: #define USE_METALNESSMAP
18: #define TEXTURE_LOD_EXT
19: uniform mat4 viewMatrix;
20: uniform vec3 cameraPosition;
21: #define TONE_MAPPING
22: #ifndef saturate
23: #define satu
09-01 09:04:08.442 29552-29575/org.mozilla.vrbrowser W/GeckoConsole: [JavaScript Warning: "Error: WebGL warning: linkProgram: Must have an compiled fragment shader attached." {file: "https://threejs.org/build/three.js" line: 17279}]
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
GLTF loading but not appearing - Questions - three.js forum
I'm new to threeJS, and I'm trying to import a GLTF file using the boilerplate from the three.js website. The console says GLTFLoader: ......
Read more >ThreeJS - GLTF loaded but not appearing - Stack Overflow
you probably need a light source. or how big is the model? · @gaitat I added a light (see above), but that didn't...
Read more >Load 3D Models in glTF Format - Discover three.js!
Here, we show you how to load complex animated models and add them to your scene ... For example, OBJ doesn't support animation,...
Read more >Three.js Loading a .GLTF File
For example this means much of their large data, like vertices, ... so you should be able to download a glTF file and...
Read more >GLTF Model Loader - Three.js Tutorials - sbcode.net
A loader for loading glTF models into the Threejs scene. ... import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader' import Stats from ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have confirmed https://threejs.org/examples/webgl_loader_gltf.html works properly after applying the patch from Bug 1491221.
File a bug at https://bugzilla.mozilla.org/show_bug.cgi?id=1491221.