FirefoxReality: glTF model doesn't appear on Three.js examples
Hardware
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}]
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (9 by maintainers)
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.