Skip to content

Forward decals are broken on Web #19177

Open
@janhohenheim

Description

@janhohenheim

Bevy version

0.16.0

Relevant system information

Using

  • Firefox 138.0.1 (64-bit)
  • Chromium Version 136.0.7103.92 (Official Build) (64-bit)

on Fedora

WebGL2:

 AdapterInfo { name: "ANGLE (AMD, AMD Radeon RX 7900 XTX (radeonsi navi31 LLVM 19.1.7), OpenGL 4.6)", vendor: 4098, device: 0, device_type: Other, driver: "", driver_info: "WebGL 2.0 (OpenGL ES 3.0 Chromium)", backend: Gl }

WebGPU:

AdapterInfo { name: "", vendor: 0, device: 0, device_type: Other, driver: "", driver_info: "", backend: BrowserWebGpu }

What you did

Opened https://bevyengine.org/examples-webgpu/3d-rendering/decal/ on Firefox using WebGL2, on Chrome using WebGL2, and on Chrome using WebGPU

What went wrong

Nothing is rendered on WebGL2, the console says

Tex storage 2D multisample is not supported

On WebGPU, nothing is rendered until I move the mouse, at which point a rendered image flashes in for a split second:

Screencast.From.2025-05-11.17-20-11.mp4

The console tells me:

Binding doesn't exist in [BindGroupLayoutInternal "mesh_view_layout"].
 - While validating that the entry-point's declaration for @group(0) @binding(28) matches [BindGroupLayoutInternal "mesh_view_layout"]
 - While validating the entry-point's compatibility for group 0 with [BindGroupLayoutInternal "mesh_view_layout"]
 - While validating fragment stage ([ShaderModule (unlabeled)], entryPoint: "fragment").
 - While validating fragment state.
 - While calling [Device].CreateRenderPipeline([RenderPipelineDescriptor ""forward_decal_pbr_alpha_blend_mesh_pipeline""]).

250[Invalid RenderPipeline "forward_decal_pbr_alpha_blend_mesh_pipeline"] is invalid.
 - While encoding [RenderPassEncoder "main_transparent_pass_3d"].SetPipeline([Invalid RenderPipeline "forward_decal_pbr_alpha_blend_mesh_pipeline"]).
 - While finishing [CommandEncoder (unlabeled)].

249[Invalid CommandBuffer] is invalid.
 - While calling [Queue].Submit([[CommandBuffer], [CommandBuffer "prepass_command_encoder" from CommandEncoder "prepass_command_encoder"], [CommandBuffer "shadow_pass_command_encoder" from CommandEncoder "shadow_pass_command_encoder"], [CommandBuffer "shadow_pass_command_encoder" from CommandEncoder "shadow_pass_command_encoder"], [CommandBuffer "shadow_pass_command_encoder" from CommandEncoder "shadow_pass_command_encoder"], [CommandBuffer "shadow_pass_command_encoder" from CommandEncoder "shadow_pass_command_encoder"], [CommandBuffer "shadow_pass_command_encoder" from CommandEncoder "shadow_pass_command_encoder"], [CommandBuffer "shadow_pass_command_encoder" from CommandEncoder "shadow_pass_command_encoder"], [CommandBuffer], [CommandBuffer "main_opaque_pass_3d_command_encoder" from CommandEncoder "main_opaque_pass_3d_command_encoder"], [Invalid CommandBuffer]])

decal/:1 WebGPU: too many warnings, no more warnings will be reported to the console for this GPUDevice.

Additional information

The 0.16 announcement post says:

Ultimately, forward decals offer broader hardware and driver support, while clustered decals are higher quality and don't require the creation of bounding geometry, improving performance. Currently clustered decals require bindless textures and thus don't support WebGL2, WebGPU, iOS and Mac targets. Forward decals are available on these targets.

So I would have expected this to work

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorO-WebSpecific to web (WASM) builds

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions