Search Unity

Official Early access to the new WebGPU backend in Unity 2023.3

Discussion in 'General Graphics' started by dnach, Nov 14, 2023.

  1. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,736
    oddly a quick trip round mine didnt cause those errors any more - although i did manage to make one black screen in the editor at one point.. but no warnings/etc on the console
     
  2. BeorGames

    BeorGames

    Joined:
    Jul 28, 2018
    Posts:
    65
    I did a full check in the editor, and everything works out correctly, but the build still doesn't work. What is weird for me is that I can't find those shaders in the project
     
  3. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,736
    i have a real issue with shaders, so, for example, i have material bricks, and about 100 walls. (its a maze) and it makes a few thousand variants, and why? its the same wall, let alone why its compling in hidden vr ones, itgs not got any vr in it
     
  4. xiongju

    xiongju

    Joined:
    Jun 2, 2020
    Posts:
    4
    Hello, I have published Google browser running a bug, how to get it
     

    Attached Files:

    • 1.png
      1.png
      File size:
      64.9 KB
      Views:
      80
    • 2.png
      2.png
      File size:
      26.8 KB
      Views:
      78
  5. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    @xiongju The version of WebGPU that was in 2023.2 has a WebGPU feature that was deprecated by browsers. You will need to use the latest 2023.3 alpha version of Unity to use WebGPU.
     
  6. xiongju

    xiongju

    Joined:
    Jun 2, 2020
    Posts:
    4
    The version of unity I was using at the time was 2023.3.0a3, but later I updated it to 2023.3.0a13 and it worked. thank you
     
    Blarp and brendanduncan_u3d like this.
  7. xiongju

    xiongju

    Joined:
    Jun 2, 2020
    Posts:
    4
    The 2023.3.0a13 test still has this problem
     
  8. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
  9. vb2s360

    vb2s360

    Joined:
    Oct 7, 2015
    Posts:
    34
    Hi @brendanduncan_u3d just wanted to share our enthusiasm with WebGPU that we tried today on our project.
    We struggled for many years with asm.js, wasm was a huge step forward, but this is an insane improvement : I experience almost instantaneous load time and twice as much FPS in our interior design app.
    Thanks a lot, and if you mind sharing a roadmap, it would be much appreciated.
     
    dnach, Zarbuz and brendanduncan_u3d like this.
  10. thickiran

    thickiran

    Joined:
    Oct 14, 2019
    Posts:
    13

    Attached Files:

  11. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    @thickiran It's not possible to tell from that error. The actual error would be at the top of the console, there will be an error for when the bind group was unsuccessfully created. The usual culprit is a texture format that isn't supported. Sometimes I'll pause the page execution (dev tools / Source / pause button) so I can see the real error without WebGPU spamming the invalid bindgroup error.
     
  12. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,736
    Interesting a16 has introduced some errors

    Code (Boo):
    1. Shader warning in 'Universal Render Pipeline/Simple Lit': Output value 'ShadowPassVertex' is not completely initialized at /Users/liz/Documents/Unity/DungeonDisasters/Library/PackageCache/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl(53) (on d3d11)
    2.  
    3. Compiling Subshader: 0, Pass: ShadowCaster, Vertex program with _CASTING_PUNCTUAL_LIGHT_SHADOW
    4. Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PASS_SHADOWCASTER UNITY_PBS_USE_BRDF1
    5. Disabled keywords: DOTS_INSTANCING_ON INSTANCING_ON LOD_FADE_CROSSFADE SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ALPHATEST_ON
    6.  
    7. Shader warning in 'Universal Render Pipeline/Simple Lit': Output value 'ShadowPassVertex' is not completely initialized at /Users/liz/Documents/Unity/DungeonDisasters/Library/PackageCache/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl(53) (on gles3)
    8.  
    9. Compiling Subshader: 0, Pass: ShadowCaster, Vertex program with LOD_FADE_CROSSFADE
    10. Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_LIGHTMAP_RGBM_ENCODING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PASS_SHADOWCASTER UNITY_PBS_USE_BRDF3
    11. Disabled keywords: DOTS_INSTANCING_ON INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ALPHATEST_ON _CASTING_PUNCTUAL_LIGHT_SHADOW
    12.  
    13. Shader warning in 'Universal Render Pipeline/Simple Lit': Output value 'ShadowPassVertex' is not completely initialized at /Users/liz/Documents/Unity/DungeonDisasters/Library/PackageCache/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl(53) (on webgpu)
    14.  
    15. Compiling Subshader: 0, Pass: ShadowCaster, Vertex program with <no keywords>
    16. Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_LIGHTMAP_RGBM_ENCODING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PASS_SHADOWCASTER UNITY_PBS_USE_BRDF3
    17. Disabled keywords: DOTS_INSTANCING_ON INSTANCING_ON LOD_FADE_CROSSFADE SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ALPHATEST_ON _CASTING_PUNCTUAL_LIGHT_SHADOW
    18.  
    19. Shader warning in 'Universal Render Pipeline/Lit': Output value 'ShadowPassVertex' is not completely initialized at /Users/liz/Documents/Unity/DungeonDisasters/Library/PackageCache/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl(53) (on d3d11)
    20.  
    21. Compiling Subshader: 0, Pass: ShadowCaster, Vertex program with <no keywords>
    22. Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PASS_SHADOWCASTER UNITY_PBS_USE_BRDF1
    23. Disabled keywords: DOTS_INSTANCING_ON INSTANCING_ON LOD_FADE_CROSSFADE SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ALPHATEST_ON _CASTING_PUNCTUAL_LIGHT_SHADOW
    24.  
    25. Shader warning in 'Universal Render Pipeline/Lit': Output value 'ShadowPassVertex' is not completely initialized at /Users/liz/Documents/Unity/DungeonDisasters/Library/PackageCache/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl(53) (on gles3)
    26.  
    27. Compiling Subshader: 0, Pass: ShadowCaster, Vertex program with _CASTING_PUNCTUAL_LIGHT_SHADOW
    28. Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_LIGHTMAP_RGBM_ENCODING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PASS_SHADOWCASTER UNITY_PBS_USE_BRDF3
    29. Disabled keywords: DOTS_INSTANCING_ON INSTANCING_ON LOD_FADE_CROSSFADE SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ALPHATEST_ON
    30.  
    31. Shader warning in 'Universal Render Pipeline/Lit': Output value 'ShadowPassVertex' is not completely initialized at /Users/liz/Documents/Unity/DungeonDisasters/Library/PackageCache/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl(53) (on webgpu)
    32.  
    33. Compiling Subshader: 0, Pass: ShadowCaster, Vertex program with _CASTING_PUNCTUAL_LIGHT_SHADOW
    34. Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_LIGHTMAP_RGBM_ENCODING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PASS_SHADOWCASTER UNITY_PBS_USE_BRDF3
    35. Disabled keywords: DOTS_INSTANCING_ON INSTANCING_ON LOD_FADE_CROSSFADE SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ALPHATEST_ON
    36.  
    37. Build completed with a result of 'Succeeded' in 267 seconds (266694 ms)
    38. 0x00007ffbf05bbaad (Unity) StackWalker::ShowCallstack
    39. 0x00007ffbf05c3459 (Unity) GetStacktrace
    40. 0x00007ffbf1d7f699 (Unity) DebugStringToFile
    41. 0x00007ffbef77a635 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    42. 0x00000176a7af1bbd (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log_Injected (UnityEngine.LogType,UnityEngine.LogOption,UnityEngine.Bindings.ManagedSpanWrapper&,intptr)
    43. 0x00000176a7af1a83 (Mono JIT Code) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    44. 0x00000176a7af16bb (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    45. 0x00000176a7af1440 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    46. 0x00000176a7af1308 (Mono JIT Code) UnityEngine.Debug:Log (object)
    47. 0x00000176a7ad1d63 (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    48. 0x00000176a7acecdb (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    49. 0x00000176a7ace7f3 (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRunInternal (bool)
    50. 0x00000176a7acdf7b (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
    51. 0x00000176c85c66ad (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    52. 0x00007ffbebf4694e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
    53. 0x00007ffbebe88464 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
    54. 0x00007ffbebe88550 (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
    55. 0x00007ffbf04e2d64 (Unity) scripting_method_invoke
    56. 0x00007ffbf04bb583 (Unity) ScriptingInvocation::Invoke
    57. 0x00007ffbf04b6835 (Unity) ScriptingInvocation::Invoke<void>
    58. 0x00007ffbf062a7db (Unity) Scripting::UnityEditor::BuildPlayerWindowProxy::BuildPlayerAndRun
    59. 0x00007ffbf0ff7ca3 (Unity) MenuController::ExecuteMenuItem
    60. 0x00007ffbf0ff721d (Unity) MenuController::ExecuteMainMenuItem
    61. 0x00007ffbefc2fdfc (Unity) EditorApplication_CUSTOM_ExecuteMenuItemInternal
    62. 0x00000176a7ac2b0d (Mono JIT Code) (wrapper managed-to-native) UnityEditor.EditorApplication:ExecuteMenuItemInternal_Injected (UnityEngine.Bindings.ManagedSpanWrapper&,bool)
    63. 0x00000176a7ac29e3 (Mono JIT Code) UnityEditor.EditorApplication:ExecuteMenuItemInternal (string,bool)
    64. 0x00000176a7ac1f03 (Mono JIT Code) UnityEditor.EditorApplication:ExecuteMenuItem (string)
    65. 0x00000176a7ac1e13 (Mono JIT Code) UnityEditor.ShortcutManagement.MenuItemEntryDiscoveryInfo:<.ctor>b__7_0 (UnityEditor.ShortcutManagement.ShortcutArguments)
    66. 0x00000176a7ac1a78 (Mono JIT Code) UnityEditor.ShortcutManagement.Trigger:ExecuteShortcut (UnityEditor.ShortcutManagement.ShortcutEntry,UnityEditor.ShortcutManagement.ShortcutStage,object)
    67. 0x00000176a7abe173 (Mono JIT Code) UnityEditor.ShortcutManagement.Trigger:HandleKeyEvent (UnityEngine.Event,UnityEditor.ShortcutManagement.IContextManager)
    68. 0x00000176a7abccc3 (Mono JIT Code) UnityEditor.ShortcutManagement.ShortcutController:HandleKeyEvent (UnityEngine.Event)
    69. 0x00000176a7980e63 (Mono JIT Code) UnityEditor.ShortcutManagement.ShortcutIntegration:EventHandler ()
    70. 0x00000176a7980cec (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()
    71. 0x00000176c85c66ad (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    72. 0x00007ffbebf4694e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
    73. 0x00007ffbebe88464 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
    74. 0x00007ffbebe88550 (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
    75. 0x00007ffbf04e2d64 (Unity) scripting_method_invoke
    76. 0x00007ffbf04bb583 (Unity) ScriptingInvocation::Invoke
    77. 0x00007ffbf04b6835 (Unity) ScriptingInvocation::Invoke<void>
    78. 0x00007ffbf0645f3b (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallGlobalEventHandler
    79. 0x00007ffbf15d4f4a (Unity) CallGlobalInputEvent
    80. 0x00007ffbf1668889 (Unity) GUIViewPlatform::ProcessEventMessages
    81. 0x00007ffbf1665023 (Unity) GUIViewPlatform::GUIViewWndProc
    82. 0x00007ffc7e17e858 (USER32) CallWindowProcW
    83. 0x00007ffc7e17e299 (USER32) DispatchMessageW
    84. 0x00007ffbf162d373 (Unity) MainMessageLoop
    85. 0x00007ffbf16333bd (Unity) UnityMain
    86. 0x00007ff6bf972cda (Unity) __scrt_common_main_seh
    87. 0x00007ffc7d5d7344 (KERNEL32) BaseThreadInitThunk
    88. 0x00007ffc7ee626b1 (ntdll) RtlUserThreadStart
    89.  
    90.  
     
    FernandoMK likes this.
  13. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    @bugfinders Those warnings can be ignored. Maybe the warnings came from stale shaders in Library after the update? You can try deleting Library to see if that resolves the warnings.
     
  14. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,736
    Oddly i woke this morning, with maybe I need to clear out a bunch of stuff.. I shall be back
     
  15. xiongju

    xiongju

    Joined:
    Jun 2, 2020
    Posts:
    4
    Hello, can resource packs played under webgl platform be supported under webgpu? Does webgpu support multithreading? Some of the macros used in the current code are webgl and are not supported under webgpu
     
  16. dusteff

    dusteff

    Joined:
    Jan 7, 2022
    Posts:
    4
    Do you have an update on the status of using Post Processing with WebGPU builds? Currently throws error: uber.shader can't make ast variable:: null
     
  17. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Is it expected that WebGPU runs slower than WebGL in Chrome at this time?
    Chrome Version 120.0.6099.71 (Official Build) (64-bit)
    Unity 2023.3.0a14
     
  18. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    @monark It all depends. Obviously you're seeing a case where WebGL is faster.

    Generally WebGPU can be marginally slower than WebGL still. WebGL has had a lot more time to mature.

    There are some cases where WebGPU can be significantly slower then WebGL. I have one fix in a PR pending release that significantly improves the performance for drawing instances, when the number of instances changes such as with terrain or grass. The usual cause of these significant slowdowns is from shader compilation performance.

    Of course there are other scenarios where WebGPU can be a lot faster, particularly when compute shaders can be utilized, such as skinning.

    If you have cases where WebGPU is being significantly slower than WebGL you can send me a DM or file a bug and I'll make sure to look into it.
     
  19. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    @dusteff What renderer are you using (URP or BiRP), and what post processing effect(s)?
     
  20. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    WebGPU does not support multithreaded rendering.

    For resources, WebGPU requires its own shaders, so if the resource packs only have WebGL shaders, they wouldn't work for WebGPU, which needs WebGPU compiled shaders.

    I'm not sure what you're referring to with "macros used in the current code".
     
  21. thickiran

    thickiran

    Joined:
    Oct 14, 2019
    Posts:
    13
    I checked my textures and they are power of 2. What else could be the issue @brendanduncan_u3d
     

    Attached Files:

  22. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    This did lead me to discover a bug where ASTC6x6_UNorm was incorrectly being mapped to WebGPU ASTC8x5.

    The ASTC formats are block aligned, not power-of-two aligned. ASTC6x6 wants textures that have a width and height that are a multiple of 6.

    Because of that bug I just mentioned, in the case of ASTC6x6_UNorm WebGPU is incorrectly wanting an 8x5 alignment of width and height. I have the PR for that fix in the queue now.
     
    thickiran and bugfinders like this.
  23. thickiran

    thickiran

    Joined:
    Oct 14, 2019
    Posts:
    13
    @brendanduncan_u3d i got a full DXT compressed version now and it is working! this is actually amazing because we are getting at least x2 frame rate with WebGPU! Haven't tried on iOS yet but Chrome on Safari is working as intended
     
  24. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Nothing significantly slower just a few frames or the same, I was really hoping it would be closer in speed to the editor, but maybe I was expecting too much.
    In Editor I get 150+, in WebGL 50-60 and in WebGPU around 50 too
     
  25. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    @monark Then it would seem your example is CPU bound and not GPU bound, and you're limited by the web platform itself (WASM, lack of threads, etc).
     
  26. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Maybe I can send you an example then as the CPU really isn't being used. It's all on the GPU side.
     
    GTA_6 likes this.
  27. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    @monark That would be great, you can DM me, I can take a look
     
  28. Gamemakers3D

    Gamemakers3D

    Joined:
    Dec 8, 2020
    Posts:
    31
    Free UnityLauncherPro saved me to switch to beta channel & back in Hub vs Try License delay not bug..

    WebGL enabled multi threading again ? (opt, can you describe there are more than 5 default - browser (chrome, mz,ie,safari,dx) settings in Unity 3d Editor 2023 webgpu&webGL compared features / opt. auto Load right one as webassemblypackage addressables for browser by multiselections checkbox build like script priority?)
    upload_2023-12-12_21-10-5.png
     
    Last edited: Dec 12, 2023
  29. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    The Web Player (previously called the WebGL Player) does support limited threading in 2023.3, some some significant limitations, https://docs.unity3d.com/2023.3/Documentation/Manual/webgl-technical-overview.html. But this is not multithreaded rendering.
     
  30. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    767
    Hi, I found that I couldn't make the Deferred rendering path work in a WebGPU build (using Unity 2023.3.0a17). Is this expected?
     
  31. lgs61716

    lgs61716

    Joined:
    Jul 5, 2019
    Posts:
    1
    I checked that it runs properly locally with 'Build and Run'. After that, I put the build file in my server and tried to run it, but it got a different result than the local. It loaded, but it showed a black screen and the game didn't run.
    And I saw an error on the console that I couldn't check in the local run.
    upload_2023-12-15_9-38-56.png
    Please tell me what the problem is.
    The scene I built is an empty scene with only the main camera.
     

    Attached Files:

  32. kyle789xbl

    kyle789xbl

    Joined:
    Oct 23, 2014
    Posts:
    10
    when using Previous 2022.3.15f1 LTS worked fine building but building with latest beta 2023... webGPU i get this hope it helps


    Code (CSharp):
    1. C:\Program Files\Unity\Hub\Editor\2023.3.0a17\Editor\Data\il2cpp\build\deploy\il2cpp.exe @Library\Bee\artifacts\rsp\6943625041250058856.rsp
    2. Error: IL2CPP error for method 'System.Void System.Threading.<>_GenericWrapper::.ctor(System.Action`1<T>)' in assembly 'C:\Users\kyle6\Desktop\Unity Projects\WEBGLGPU\Library\Bee\artifacts\WebGL\ManagedStripped\mscorlib.dll'
    3. System.InvalidOperationException: Attempting to return from void method 'System.Void System.Threading.<>_GenericWrapper::.ctor(System.Action`1<T>)' when there are values on the stack. Is this invalid IL code?
    4.    at Unity.IL2CPP.MethodBodyWriter.WriteReturnStatement() + 0x4ea
    5.    at Unity.IL2CPP.MethodBodyWriter.ProcessInstruction(Node, InstructionBlock, ResolvedInstruction) + 0x85e
    6.    at Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive(Node, ReadOnlyDictionary`2) + 0x827
    7.    at Unity.IL2CPP.MethodBodyWriter.Generate() + 0x72f
    8.    at Unity.IL2CPP.CodeWriters.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter, String, Action`2, String, MethodReference, WritingMethodFor) + 0x2ef
    9.    at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(AssemblyWriteContext, IGeneratedMethodCodeWriter, MethodReference) + 0x40a
    10.    at Unity.IL2CPP.SourceWriter.WriteTypesMethods(SourceWritingContext, IGeneratedMethodCodeWriter, TypeWritingInformation&, NPath, Boolean) + 0x560
    11.    at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.WriteItem(StreamWorkItemData`2) + 0x1fc
    12.    at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data) + 0x1ed
    13.    at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data) + 0x60e
    14.  
    15. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    16.  
     
    Last edited: Dec 18, 2023
  33. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,736
    I thought they said only 2023.3 ..
     
  34. Zarbuz

    Zarbuz

    Joined:
    Oct 13, 2015
    Posts:
    44
    It seems that VFXGraph isn't activated for WebGPU right ? I still have the error 'Invalid VFX Particle System. It is skipped." both in editor and in WebGPU build. Can't wait to try it !
     
  35. dnach

    dnach

    Unity Technologies

    Joined:
    Mar 9, 2022
    Posts:
    89
    That is correct! VFX Graph is not yet compatible, but support is coming later down the line. We will share an update once it is ready :)

    WebGPU is only supported in early access for the latest 2023.3 releases. Could you fetch the latest alpha release and give it a try? As of writing this reply, the latest available is 2023.3.0a18, which can be downloaded here: https://unity.com/releases/editor/alpha
     
  36. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    2022.3 had an early version of WebGPU, but won't be updated, all updates will go into 2023.3. That error looks like a general Web platform issue. When you tried 2023.3, did you try deleting Library? If it continues to be an issue, can you file a bug, or send me a repo, and I can take a look.
     
    kyle789xbl likes this.
  37. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Hey @brendanduncan_u3d, I'm currently working on Eonfall, a fast-paced, co-op action game built for the web. I've attached a link to preview the current work-in-progress gameplay below if interested to check it out. Anyway, I would absolutely love to port this game over to WebGPU! I understand it's still in alpha state, but I'm not planning to release my game until the end of 2024.

    Do you think we'll see major progress with WebGPU in the coming months? How soon do you think it will be until it reaches a stable, production ready state?

    https://x.com/eonfallgame/status/1730749676620558589?s=20

    Also, I did upgrade a copy of my project from Unity 2021.3.30f1 to Unity 2023.3.0a13 with minimal issues. My game runs perfectly fine in the Editor, but when I tried to play my game with a WebGPU Build here: https://webgpu.eonfall.dev all I get is a black screen after the Unity loader completes. No console errors at all, even when I enabled full error logging with stack tracing. Any ideas how I could fix this?
     
    Last edited: Jan 4, 2024
  38. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    @jonkuze WebGPU will remain in experimental state for 2023.3. As for it's suitability for production work, that's a personal choice. If you're hitting a case that's not working, like you clearly are, then we would certainly like to know about it and will work on getting it sorted out.

    The other factor is browser support. Chrome for Windows and MacOS is the farthest along, fallowed by Chrome on Linux. Chrome Android is supposed to ship in January sometime. Safari just released a MacOS Safari Technical Preview version with their initial WebGPU implementation. They still have a number of bugs that prevent Unity content from working, but we are actively working closely with Apple to get their implementation ironed out. After they get MacOS Safari WebGPU working reasonably well, iPhone and iPad Safari will not be too far along after that.

    Some questions about the problems you're seeing:
    1. Does it work with WebGL?
    2. Any way you can get me a repo project? Can you reduce the elements in the scene to some minimal subset? Or at least can you describe to me details about what is in the scene? You can DM me details.
     
    jonkuze likes this.
  39. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Thank you, I'll DM you for sure. = )
     
  40. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    As of one of the most recent 2023.3 updates (either a18 or b1), WebGPU builds went from working fine to being black for me also (using URP), unless I enable the Compatibility Mode checkbox under Project Settings->Graphics->URP.. and then the builds work fine again. So if you're using URP maybe try that and see if it works.
    fix_webgpu_builds.png
     
    Rouddem likes this.
  41. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Ah yes, I am using URP and I did enabled this. I also decided to move to version b1 as well. After upgrading to version b1, the editor began throwing shader errors related to an asset I was using. So I totally uninstalled that asset and the errors are gone. But now I'm facing a build issue. I attached my build errors. More stuff related to shaders...
     

    Attached Files:

  42. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    @jonkuze any chance you're running a custom version of URP? i ask because for example if you have copied it out to another location and then added it to project from there, editor shows latest is "17.0.1" but actually that gets changed a bunch of times while still being called "17.0.1" - the revision number has proven mostly useless to know whether changes were made, unfortunately we have to do comparison/dif with previous vs. new folders/files to see what changed, or just always grab again by habit from a fresh URP template-based project and reapply customizations after each time upgrading editor. i complained about this (versions of URP not increasing despite there being changes) back in URP 14 and got no response from anyone at Unity about why they don't increment version when there's changes.

    since the errors in your log are related to asset dependency and a shader that's included in the URP package, it's beyond me, except to suggest (if you haven't already done this) to close project, delete Library and reimport (and do that as a habit after upgrading editor version). sometimes things get cached there incorrectly/aren't re-imported when necessary and just letting Unity reconstruct library fixes the project. i mostly stick to only using Shader Graph shaders whenever possible because they upgrade easier.. whether or not related, figured i'd also mention that has helped reduce number of issues with upgrades / less issues now than before.
     
  43. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,736
    Isnt the render graph the new fancy kinda like occlusion culling but not quite and isnt for webgl?
     
  44. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    bugfinders likes this.
  45. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    I wouldn't even know how to create a custom version of URP lol! So naaa I doubt it... it's possible maybe the asset that I used in my project that was initially throwing some errors could have possibly modified or imported some configs i'm unaware of. The shader referenced in my build error 4 times "Universal Render Pipeline/Particles/Unlit" is a standard shader included apart of URP is my understanding. So not sure what other shaders are still linger around that would cause conflict... :(

    I deleted the asset's folder (that was initially throwing errors) from the project and removed all components related to the asset in my scene. Do I need to do a re-import you think of all assets to cleanup anything left behind by that asset somehow? I've actually never heard of a clean way to uninstall an asset other than to delete the asset folder. Maybe i'm missing a step. As that asset did include a-lot of custom shaders for a dynamic weather system that this latest Unity version didn't like.
     
  46. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    yeah ..as of 0a18+, Render Graph became enabled by default - and that broke some assets (discussed further in the thread i just pasted a link to above), with the only solution right now to use the "compatibility mode", which i really hope will stick around throughout Unity 6 LTS... because some publishers have a lot of work ahead of them updating assets, some may not get around to doing that urgently, some will be releasing new Unity 6-compatible versions we have to wait to be released before we can purchase/upgrade to those.. and that might not happen until after Unity 6 hits LTS because some publishers understandably don't want to spend time supporting their assets being used in alpha/beta/WIP versions of the editor.

    it's funny because u know, just prior to this Render Graph thing, finally things were really shaping up! all my projects were working in WebGPU, all assets i was using in my main project were working.. and then bam! assets broke. WebGPU broke. well, lucky we have "compatibility mode" i guess, if it sticks around, and unlucky as they said "Unity no longer develops or improves" what our projects were using prior to Render Graph. but, yeah, long run it's a good thing, we take a step backward for the sake of two steps forward or whatever, such is progress at times :) but still frustrating. and i don't know what else to suggest you try, so hopefully @brendanduncan_u3d can help u solve it - good luck! :D
     
    jonkuze likes this.
  47. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    I'm working on trying to get all this sorted out. I'm sorry all of this happened the way it did, conflicting with the work we're doing with WebGPU. I came back from the holidays with a lot of fires to put out . We'll get it sorted.
     
  48. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    436
    Some updates from the Safari front: Apple just released Safari Technical Preview with WebGPU support available behind a flag: https://webkit.org/blog/14879/webgpu-now-available-for-testing-in-safari-technology-preview/.

    The current version of Safari's WebGPU implementation has a number of bugs that prevent Unity content from working. But I have been working closely with the WebKit devs to find and fix these bugs, and we're making great progress on getting Unity WebGPU running on Safari. Once the implementation gets ironed out in Safari Tech Preview, it will roll out into regular MacOS Safari, and mobile shortly after that. Of course there's no timelines for any of this, per Apple's policy, but it's exciting that they're fully on board with WebGPU, and the devs are eager to get it out into the world.
     
  49. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    well on the upside, the texture filtering issues seem to be getting resolved - most (possibly all) of the stuff that looked pixelated in previous builds trying WebGPU now look as good as WebGL, and adjusting Render Scale at runtime in WebGPU builds now noticeably impacts how good everything looks / sharpens it up at higher scales etc. (probably because of the texture filtering-related work), so.. getting there - and welcome back, good luck with everything on your list! :)
     
    saskenergy and brendanduncan_u3d like this.
  50. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709