# WGSL error when using WebGPU, PBR and SSAO2 rendering pipeline

**URL:** <https://forum.babylonjs.com/t/wgsl-error-when-using-webgpu-pbr-and-ssao2-rendering-pipeline/62543>\
**Category:** Questions\
**Tags:** pbr, webgpu, ssao2\
**Created:** [February 23, 2026, 4:03pm UTC](https://forum.babylonjs.com/t/wgsl-error-when-using-webgpu-pbr-and-ssao2-rendering-pipeline/62543 "2026-02-23T16:03:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoakimConf](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@JoakimConf](https://forum.babylonjs.com/u/JoakimConf)\
**Post date:** [February 23, 2026, 4:03pm UTC](https://forum.babylonjs.com/t/wgsl-error-when-using-webgpu-pbr-and-ssao2-rendering-pipeline/62543/1 "2026-02-23T16:03:21Z")

</div>

Hi,

I’m trying to render a scene using WebGPU and have bumped into an issue that I’m unsure if it’s a bug or just me misconfiguring the setup. What I have is a WebGPU engine, a SSAO2 rendering pipeline and a PBR material with the `needDepthPrePass` property sat to true. This combo causes the scene not to render and this output in the console:

`installHook.js:1 BJS - [16:18:09]: WebGPU uncaptured error (1): [object GPUValidationError] - Error while parsing WGSL: :976:1 error: struct member color not found`  
`fragmentOutputs.color= vec4f(0.,0.,0.,1.0);`  
`^^^^^^^^^^^^^^^^^^^^^`

` - While calling [Device "BabylonWebGPUDevice0"].CreateShaderModule([ShaderModuleDescriptor ""fragment""]).`

Is this a bug or is it me misconfiguring the scene?

Here’s a playground with a reproduction: [https://playground.babylonjs.com/#302J6D#2](https://playground.babylonjs.com/#302J6D#2) It works fine when using WebGL but the error appears when using WebGPU.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [February 23, 2026, 4:29pm UTC](https://forum.babylonjs.com/t/wgsl-error-when-using-webgpu-pbr-and-ssao2-rendering-pipeline/62543/2 "2026-02-23T16:29:35Z")

</div>

cc @Evgeni_Popov

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 23, 2026, 6:59pm UTC](https://forum.babylonjs.com/t/wgsl-error-when-using-webgpu-pbr-and-ssao2-rendering-pipeline/62543/3 "2026-02-23T18:59:41Z")

</div>

Welcome aboard!

Thanks for reporting, here’s the fix:

> <https://github.com/BabylonJS/Babylon.js/pull/17939>
>
> See https://forum.babylonjs.com/t/wgsl-error-when-using-webgpu-pbr-and-ssao2-ren…dering-pipeline/62543

---

<div class="post-metadata">

**Author:** ![JoakimConf](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@JoakimConf](https://forum.babylonjs.com/u/JoakimConf)\
**Post date:** [February 23, 2026, 8:05pm UTC](https://forum.babylonjs.com/t/wgsl-error-when-using-webgpu-pbr-and-ssao2-rendering-pipeline/62543/4 "2026-02-23T20:05:20Z")

</div>

Wow that was fast, great work!
