# \#shadowdepthwrapper

**URL:** https://forum.babylonjs.com/tag/shadowdepthwrapper/145.md

[Latest](https://forum.babylonjs.com/latest.md) · [Categories](https://forum.babylonjs.com/categories.md) · [Tags](https://forum.babylonjs.com/tags.md)

---

## [\[Fixed\] ShadowDepthWrapper - fails with fx files, works with equivalent shader strings](https://forum.babylonjs.com/t/fixed-shadowdepthwrapper-fails-with-fx-files-works-with-equivalent-shader-strings/58080)

<div class="topic-metadata">

**Author:** [@violgamba](https://forum.babylonjs.com/u/violgamba)\
**Replies:** 2\
**Last updated:** [May 1, 2025, 10:53pm UTC](https://forum.babylonjs.com/t/fixed-shadowdepthwrapper-fails-with-fx-files-works-with-equivalent-shader-strings/58080 "2025-05-01T22:53:43Z")

</div>

Note: A playground example is not possible, a minimal example is provided for download First of all, this issue directly relates to using shader fx files, so the playground is not an option (please correct me if I’m wro…

---

## [ShadowDepthWrapper error with WGSL shader syntax](https://forum.babylonjs.com/t/shadowdepthwrapper-error-with-wgsl-shader-syntax/41394)

<div class="topic-metadata">

**Author:** [@slin](https://forum.babylonjs.com/u/slin)\
**Replies:** 9\
**Last updated:** [February 1, 2024, 12:46am UTC](https://forum.babylonjs.com/t/shadowdepthwrapper-error-with-wgsl-shader-syntax/41394 "2024-02-01T00:46:14Z")

</div>

Hi, I am facing an error with ShadowDepthWrapper when my vertex and fragment shader are written in WGSL. The code works fine without ShadowDepthWrapper. But adding shadowDepthWrapper causes GLSL compilation error. I am…

---

## [Need help with shadow for CustomMaterial](https://forum.babylonjs.com/t/need-help-with-shadow-for-custommaterial/30709)

<div class="topic-metadata">

**Author:** [@nmrugg](https://forum.babylonjs.com/u/nmrugg)\
**Replies:** 3\
**Last updated:** [May 24, 2022, 11:16pm UTC](https://forum.babylonjs.com/t/need-help-with-shadow-for-custommaterial/30709 "2022-05-24T23:16:26Z")

</div>

I have a CustomMaterial that modifies the vertex positions, and I’m trying to use ShadowDepthWrapper to correct the shadow, but it is not working. Playground: https://www.babylonjs-playground.com/#UXCB15#153 Could some…
