[WebGL 2.0] Texture2DArray support?
When running the my game (on ubuntu) in the editor under WebGL-build (with only WebGL 2.0 added in player-settings, OpenGL 4.5) SystemInfo.supports2DArrayTextures returns false, while in standalone-build (OpenGL 4.5) it returns true and everything works as intended (so the hardware is apparenly supported). Shader is set to target 3.5 (also tried with es3.0). WebGL-builds run in Firefox 56.0 (OpenGL ES 3.0) also fails and throws an error:
TypeError: Argument 8 of WebGL2RenderingContext.compressedTexSubImage2D is not an object.
How can a supported hardware with supported API not support Texture2DArray? Is this intended?
EDIT: Holy crap. Wondered if I could force Unity to use OpenGL ES 3.0 in editor and saw that the emulator was running WebGL 1.0... Still doesn't explain the actual error when built though...
Full error from Firefox:
Initialize engine version: 2017.2.0f1 (ad31c9083c46)
2765a82d-3bb8-47e0-8750-924623df20d0:2:183136
Creating WebGL 2.0 context. UnityLoader.js:1:7731
Renderer: Mozilla
2765a82d-3bb8-47e0-8750-924623df20d0:2:183136
Vendor: Mozilla
2765a82d-3bb8-47e0-8750-924623df20d0:2:183136
Version: OpenGL ES 3.0 (WebGL 2.0)
2765a82d-3bb8-47e0-8750-924623df20d0:2:183136
GLES: 3
2765a82d-3bb8-47e0-8750-924623df20d0:2:183136
EXT_color_buffer_float GL_EXT_color_buffer_float EXT_texture_filter_anisotropic GL_EXT_texture_filter_anisotropic EXT_disjoint_timer_query GL_EXT_disjoint_timer_query OES_texture_float_linear GL_OES_texture_float_linear WEBGL_compressed_texture_etc GL_WEBGL_compressed_texture_etc WEBGL_compressed_texture_s3tc GL_WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb GL_WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info GL_WEBGL_debug_renderer_info WEBGL_debug_shaders GL_WEBGL_debug_shaders WEBGL_lose_context GL_WEBGL_lose_context MOZ_WEBGL_lose_context GL_MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc GL_MOZ_WEBGL_compressed_texture_s3tc
2765a82d-3bb8-47e0-8750-924623df20d0:2:183136
OPENGL LOG: Creating OpenGL ES 3.0 graphics device ; Context level <OpenGL ES 3.0> ; Context handle 1
2765a82d-3bb8-47e0-8750-924623df20d0:2:183136
exception thrown: TypeError: Argument 8 of WebGL2RenderingContext.compressedTexSubImage2D is not an object.,_glCompressedTexSubImage3D@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:2:50317
MGv@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:35:1
Kua@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:18:1
Owa@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:18:1
Jwa@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:18:1
cja@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:18:1
i8a@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:22:1
Q7a@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:22:1
Z5@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:12:1
cFa@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:18:1
Oib@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:23:1
Eib@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:23:1
aRb@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:20:1
$Qb@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:20:1
XQb@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:20:1
OPb@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:20:1
oPb@blob:null/de1ff387-c054-49ab-9f92-9aba68705eef:20:1
callMain@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:4:33285
doRun@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:4:33988
run@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:4:34174
runCaller@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:4:32802
removeRunDependency@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:2:34426
UnityLoader["62894b271de2d3b4cd93eeac7fc2d312"]/</unityFileSystemInit</<@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:2:357
doCallback@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:2:122723
done@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:2:122861
done@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:2:105924
storeLocalEntry@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:2:104384
UnityLoader["62894b271de2d3b4cd93eeac7fc2d312"]/reconcile/</<@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:2:106150
UnityLoader["62894b271de2d3b4cd93eeac7fc2d312"]/loadRemoteEntry/req.onsuccess@blob:null/2765a82d-3bb8-47e0-8750-924623df20d0:2:104734
UnityLoader.js:1:7768
Invoking error handler due to
TypeError: Argument 8 of WebGL2RenderingContext.compressedTexSubImage2D is not an object.
Answer by arsys · Jun 25, 2018 at 07:33 AM
The same is happening to me after modifying a project to include CTS:
Successfully compiled asm.js code (total compilation time 5ms; not stored in cache (too small to benefit)) UnityLoader.js Successfully compiled asm.js code (total compilation time 17ms; not stored in cache (too small to benefit)) UnityLoader.js You can reduce your startup time if you configure your web server to host .unityweb files using gzip compression. UnityLoader.js:4:8480 Successfully compiled asm.js code (total compilation time 15516ms; stored in cache) 61ea9703-f0b5-48a5-9d28-b5e887d090d7 unreachable code after return statement[Conocer más] d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:4519 [UnityCache] 'http://arsysnet.com.ar/la-isla/Build/WebGL.data.unityweb' successfully downloaded but not stored in the indexedDB cache due to the error: UnknownError: The serialized value is too large (size=606600509 bytes, max=267386880 bytes). UnityLoader.js:1:17959 El uso del sensor de movimiento es obsoleto. d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:56577 El uso del sensor de orientación es obsoleto. d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:56577 Loading player data from data.unity3d d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Initialize engine version: 2017.4.3f1 (21ae32b5a9cb) d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Creating WebGL 2.0 context. UnityLoader.js:1:8002 Renderer: Mozilla d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Vendor: Mozilla d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Version: OpenGL ES 3.0 (WebGL 2.0) d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 GLES: 3 d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 EXT_color_buffer_float GL_EXT_color_buffer_float EXT_texture_filter_anisotropic GL_EXT_texture_filter_anisotropic OES_texture_float_linear GL_OES_texture_float_linear WEBGL_compressed_texture_s3tc GL_WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb GL_WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info GL_WEBGL_debug_renderer_info WEBGL_debug_shaders GL_WEBGL_debug_shaders WEBGL_lose_context GL_WEBGL_lose_context d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 OPENGL LOG: Creating OpenGL ES 3.0 graphics device ; Context level ; Context handle 1 d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 WARNING: Shader d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Unsupported: 'Hidden/BlitToDepth' - Pass '' has no vertex shader d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 WARNING: Shader d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Unsupported: 'Hidden/BlitToDepth' - Setting to default shader. d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 WARNING: Shader d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Unsupported: 'Hidden/BlitToDepth_MSAA' - Pass '' has no vertex shader d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 WARNING: Shader d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Unsupported: 'Hidden/BlitToDepth_MSAA' - Setting to default shader. d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 ERROR: 0:89: 'bitfieldInsert' : no matching overloaded function found ERROR: 0:90: 'bitfieldInsert' : no matching overloaded function found
d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Note: Creation of internal variant of shader 'Hidden/TerrainEngine/CameraFacingBillboardTree' failed. d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 UnloadTime: 4.000000 ms d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 WARNING: Shader d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Unsupported: 'Hidden/Post FX/Temporal Anti-aliasing' - Pass '' has no vertex shader d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 warning: 2 FS.syncfs operations in flight at once, probably just doing extra work d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:124496 Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates! UnityLoader.js:1:8039 warning: 3 FS.syncfs operations in flight at once, probably just doing extra work d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:124496 warning: 4 FS.syncfs operations in flight at once, probably just doing extra work d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:124496 UnloadTime: 189.000000 ms d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Unloading 6 Unused Serialized files (Serialized files now loaded: 0) d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993
Unloading 75 unused Assets to reduce memory usage. Loaded Objects now: 1353. d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Total: 49.000000 ms (FindLiveObjects: 1.000000 ms CreateObjectMapping: 0.000000 ms MarkObjects: 9.000000 ms DeleteObjects: 38.000000 ms)
d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 WARNING: Shader d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 Unsupported: 'Hidden/Post FX/Depth Of Field' - Pass 'COC TEMPORAL FILTER' has no vertex shader d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:175993 warning: 2 FS.syncfs operations in flight at once, probably just doing extra work d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:124496 exception thrown: TypeError: Argument 8 of WebGL2RenderingContext.compressedTexSubImage2D is not an object.,_glCompressedTexSubImage3D@blob:http://arsysnet.com.ar/d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:51404 XXx@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:36:1 HUr@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:16:1 rXr@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:16:1 mXr@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:16:1 zMr@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:16:1 jps@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:21:1 Ros@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:21:1 hhc@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:33:1 d1r@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:18:1 qAs@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:21:1 W0s@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:15:1 Jit@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:14:1 S3s@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:15:1 R$s@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:15:1 F$s@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:15:1 DUx@blob:http://arsysnet.com.ar/61ea9703-f0b5-48a5-9d28-b5e887d090d7:36:1 browserIterationFunc@blob:http://arsysnet.com.ar/d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:211920 runIter@blob:http://arsysnet.com.ar/d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:193981 Browser_mainLoop_runner@blob:http://arsysnet.com.ar/d4e85d42-95f7-4b34-b46f-46d6748be5b6:2:213457 UnityLoader.js:1:8039 Invoking error handler due to TypeError: Argument 8 of WebGL2RenderingContext.compressedTexSubImage2D is not an object. UnityLoader.js:1:14777 unreachable code after return statement
Your answer
Follow this Question
Related Questions
WebGL: Fix incorrect header check error when loading Content-Encoding: gzip files 3 Answers
Cant define array from other script 0 Answers
uncaught exception: abort(132) WebGL 1 Answer
way my game is not working after build to WebGL? 0 Answers
Cannot Export to WebGL because of il2CPP stops working. 2 Answers