# Render artifacts with KHR\_materials\_volume and KHR\_materials\_transmission

**URL:** <https://forum.babylonjs.com/t/render-artifacts-with-khr-materials-volume-and-khr-materials-transmission/21414>\
**Category:** Bugs\
**Tags:** material\
**Created:** [June 4, 2021, 7:48pm UTC](https://forum.babylonjs.com/t/render-artifacts-with-khr-materials-volume-and-khr-materials-transmission/21414 "2021-06-04T19:48:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomasdideriksen](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@thomasdideriksen](https://forum.babylonjs.com/u/thomasdideriksen)\
**Post date:** [June 4, 2021, 7:48pm UTC](https://forum.babylonjs.com/t/render-artifacts-with-khr-materials-volume-and-khr-materials-transmission/21414/1 "2021-06-04T19:48:37Z")

</div>

I’ve been playing around with _KHR\_materials\_volume_ and _KHR\_materials\_transmission_ in the sandbox (v5.0.0-alpha.24). I’m running into a rendering issue when I define both a **transmissionTexture** and a **thicknessTexture**.

If I remove either one of them (and rely on the _transmissionFactor_ and/or _thicknessFactor_ instead) the rendering artifacts seems to go away.

Here’s an example that demonstrates the issue - this sample defines both the **transmissionTexture** and the **thicknessTexture**. The transmission texture is all white (255, 255, 255), so I would expect the sphere to be fully transparent, but that’s not the case.  
[[Download]](https://drive.google.com/file/d/1yMHc3_7i2fHsqnU9rvX0CQV8SRc_5TD1/view?usp=sharing)

For reference, here’s a version where I removed the **transmissionTexture** , which appears to work around the issue:  
[[Download]](https://drive.google.com/file/d/1f3NNvQR5udcwpsNIErD7mP98TvL3lVm5/view?usp=sharing)

I’m unable to reproduce this issue using the Khronos glTF sample viewer.

Thanks!

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [June 4, 2021, 8:05pm UTC](https://forum.babylonjs.com/t/render-artifacts-with-khr-materials-volume-and-khr-materials-transmission/21414/2 "2021-06-04T20:05:33Z")

</div>

Welcome to the forum, @Evgeni_Popov could you have a look ?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [June 4, 2021, 9:11pm UTC](https://forum.babylonjs.com/t/render-artifacts-with-khr-materials-volume-and-khr-materials-transmission/21414/3 "2021-06-04T21:11:37Z")

</div>

Actually in Babylon we only have one texture to hold on thickness + mask so if you use the different textures in both extensions, or even one of them it would end up being impacting the others.

In gltf translucency, transmission, thickness can be splitted samplers which is the issue here.

Your best workaround would be to store the thickness in the green chan, and the transmission in the red one. Then you can use this texture in both extensions, it is a workaround for now waiting to check how we ll address it in the team.

---

<div class="post-metadata">

**Author:** ![thomasdideriksen](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@thomasdideriksen](https://forum.babylonjs.com/u/thomasdideriksen)\
**Post date:** [June 5, 2021, 3:37am UTC](https://forum.babylonjs.com/t/render-artifacts-with-khr-materials-volume-and-khr-materials-transmission/21414/4 "2021-06-05T03:37:37Z")

</div>

Works perfectly. Thanks for the quick response!
