<h5 dir="auto">Description of the problem</h5>
<p dir="auto">Hello,</p>
<p dir="auto">We're facing a problem with some envmap using. On firefox for Android, if you try to run (for example) this sample : <a href="https://threejs.org/examples/webgl_loader_gltf.html" rel="nofollow">https://threejs.org/examples/webgl_loader_gltf.html</a> the 3D helmet model will not be rendered.</p>
<p dir="auto">We did investigations and we noticed than the problem is present from Firefox for Android 57 and until last release (the problem is present on firefox beta too...)</p>
<p dir="auto">The firefox console displays the following error :</p>
<p dir="auto">THREE.WebGLRenderer 92<br>
three.js:21172:3<br>
THREE.GLTFLoader: Duplicating UVs to support aoMap.<br>
GLTFLoader.js:2262:7<br>
THREE.WebGLShader: Shader couldn't compile.<br>
three.js:16089:4<br>
WebGLShader<br>
<a href="https://threejs.org/build/three.js:16089:4" rel="nofollow">https://threejs.org/build/three.js:16089:4</a><br>
WebGLProgram<br>
<a href="https://threejs.org/build/three.js:16624:26" rel="nofollow">https://threejs.org/build/three.js:16624:26</a><br>
WebGLPrograms/this.acquireProgram<br>
<a href="https://threejs.org/build/three.js:17052:15" rel="nofollow">https://threejs.org/build/three.js:17052:15</a><br>
initMaterial<br>
<a href="https://threejs.org/build/three.js:22633:15" rel="nofollow">https://threejs.org/build/three.js:22633:15</a><br>
setProgram<br>
<a href="https://threejs.org/build/three.js:22773:5" rel="nofollow">https://threejs.org/build/three.js:22773:5</a><br>
WebGLRenderer/this.renderBufferDirect<br>
<a href="https://threejs.org/build/three.js:21797:18" rel="nofollow">https://threejs.org/build/three.js:21797:18</a><br>
renderObject<br>
<a href="https://threejs.org/build/three.js:22556:5" rel="nofollow">https://threejs.org/build/three.js:22556:5</a><br>
renderObjects<br>
<a href="https://threejs.org/build/three.js:22526:6" rel="nofollow">https://threejs.org/build/three.js:22526:6</a><br>
WebGLRenderer/this.render<br>
<a href="https://threejs.org/build/three.js:22288:33" rel="nofollow">https://threejs.org/build/three.js:22288:33</a><br>
animate<br>
<a href="https://threejs.org/examples/webgl_loader_gltf.html:131:5" rel="nofollow">https://threejs.org/examples/webgl_loader_gltf.html:131:5</a><br>
THREE.WebGLShader: gl.getShaderInfoLog() fragment WARNING: 0:1: extension 'GL_EXT_shader_texture_lod' is not supported<br>
ERROR: 0:117: 'textureCubeLodEXT' : no matching overloaded function found<br>
ERROR: 0:117: '=' :  cannot convert from 'const float' to '4-component vector of float'<br>
ERROR: 2 compilation errors.  No code generated.</p>
<p dir="auto">1: #extension GL_OES_standard_derivatives : enable<br>
2: #extension GL_EXT_shader_texture_lod : enable<br>
3: precision highp float;<br>
4: precision highp int;<br>
5: #define SHADER_NAME MeshStandardMaterial<br>
6: #define STANDARD<br>
7: #define GAMMA_FACTOR 2<br>
8: #define USE_MAP<br>
9: #define USE_ENVMAP<br>
10: #define ENVMAP_TYPE_CUBE<br>
11: #define ENVMAP_MODE_REFLECTION<br>
12: #define ENVMAP_BLENDING_MULTIPLY<br>
13: #define USE_AOMAP<br>
14: #define USE_EMISSIVEMAP<br>
15: #define USE_NORMALMAP<br>
16: #define USE_ROUGHNESSMAP<br>
17: #define USE_METALNESSMAP<br>
18: #define TEXTURE_LOD_EXT<br>
19: uniform mat4 viewMatrix;<br>
20: uniform vec3 cameraPosition;<br>
21: #define TONE_MAPPING<br>
22: #ifndef saturate<br>
23: 	#define saturate(a) clamp( a, 0.0, 1.0 )<br>
24: #endif<br>
25: uniform float toneMappingExposure;<br>
26: uniform float toneMappingWhitePoint;<br>
27: vec3 LinearToneMapping( vec3 color ) {<br>
28: 	return toneMappingExposure * color;<br>
29: }<br>
30: vec3 ReinhardToneMapping( vec3 color ) {<br>
31: 	color *= toneMappingExposure;<br>
32: 	return saturate( color / ( vec3( 1.…<br>
three.js:16095:4<br>
THREE.WebGLProgram: shader error:  0 gl.VALIDATE_STATUS false gl.getProgramInfoLog Must have an compiled fragment shader attached.  WARNING: 0:1: extension 'GL_EXT_shader_texture_lod' is not supported<br>
ERROR: 0:117: 'textureCubeLodEXT' : no matching overloaded function found<br>
ERROR: 0:117: '=' :  cannot convert from 'const float' to '4-component vector of float'<br>
ERROR: 2 compilation errors.  No code generated.<br>
three.js:16658:4<br>
Error: WebGL warning: linkProgram: Must have an compiled fragment shader attached.<br>
three.js:16642:3<br>
Error: WebGL warning: useProgram: Program has not been successfully linked.<br>
three.js:19211:5<br>
Error: WebGL: No further warnings will be reported for this WebGL context. (already reported 32 warnings)</p>
<p dir="auto">The problem seems to be independent of the Android version (reproduced on Android 7 and 8), and no problem on iOS</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r92</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li>[] All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li>[] All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>
<p dir="auto">I've been testing returning indexed buffer geometry with the FBXLoader, and it looks like it should be possible (at least, I have it working for some simple models consisting of just vertices and normals).</p>
<p dir="auto">It certainly reduces duplication of vertex info a lot, especially when dividing up quads.</p>
<p dir="auto">Getting the indexing to work with  complex models with skinning data will be quite a bit of work though, so before I go ahead, is this something that is worth the effort? Or are there potential negative effects from doing this?</p>