# Refractive Textures in 4.2.0-alpha.29

**URL:** <https://forum.babylonjs.com/t/refractive-textures-in-4-2-0-alpha-29/13118>\
**Category:** Questions\
**Created:** [August 4, 2020, 5:34pm UTC](https://forum.babylonjs.com/t/refractive-textures-in-4-2-0-alpha-29/13118 "2020-08-04T17:34:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![blitt6](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@blitt6](https://forum.babylonjs.com/u/blitt6)\
**Post date:** [August 4, 2020, 5:34pm UTC](https://forum.babylonjs.com/t/refractive-textures-in-4-2-0-alpha-29/13118/1 "2020-08-04T17:34:00Z")

</div>

Hi,

We’re trying out the latest release, and we’re seeing some different behavior with refractive textures that we’re using. We’re seeing a kinda of white sheen or reflection obscuring the refraction on curved surfaces. Do you know what change might be causing this?

Thanks,

B

---

<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:** [August 4, 2020, 6:19pm UTC](https://forum.babylonjs.com/t/refractive-textures-in-4-2-0-alpha-29/13118/2 "2020-08-04T18:19:24Z")

</div>

Hello this is tough to help without a repro

You can use the playground for that as you can change the version in use to compare

---

<div class="post-metadata">

**Author:** ![blitt6](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@blitt6](https://forum.babylonjs.com/u/blitt6)\
**Post date:** [August 4, 2020, 8:09pm UTC](https://forum.babylonjs.com/t/refractive-textures-in-4-2-0-alpha-29/13118/3 "2020-08-04T20:09:24Z")

</div>

I wish I could share the repo I’m working on…  
I can tell you that the breaking change is in v4.2.0-alpha.18. Our refractive textures show as expected with alpha.17, but start acting strange with alpha.18. I’ll try to dig in more and see if I can narrow it down further.

---

<div class="post-metadata">

**Author:** ![blitt6](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@blitt6](https://forum.babylonjs.com/u/blitt6)\
**Post date:** [August 5, 2020, 10:37pm UTC](https://forum.babylonjs.com/t/refractive-textures-in-4-2-0-alpha-29/13118/4 "2020-08-05T22:37:47Z")

</div>

I managed to narrow it down. We are currently creating refractiveTextures and applying them to materials along with subsurface properties on particular meshes. We are manually setting those subsurface properties, and resetting them when needed. Looking into the Babylon code, it looks like the `PBRSubsurfaceConfiguration` class is now handling much of this, and introduces a new `volumeIndexOfRefraction`. This new property seems to affect refraction differently than it was, and we’re having a hard time seeing how we can consistently replicate what we’ve been doing without that property.

Is there anything you can tell me about how to use this new way of configuring subsurface/refractive properties, and perhaps why the change was made?

Thanks!

---

<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:** [August 6, 2020, 1:50pm UTC](https://forum.babylonjs.com/t/refractive-textures-in-4-2-0-alpha-29/13118/5 "2020-08-06T13:50:24Z")

</div>

Pinging @sebavan

---

<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:** [August 6, 2020, 2:19pm UTC](https://forum.babylonjs.com/t/refractive-textures-in-4-2-0-alpha-29/13118/6 "2020-08-06T14:19:30Z")

</div>

The only behavior we fixed it we were before not using indexOfRefraction but ETA which like 1/indexOfRefraction for a model in an air medium.

Could you try simply setting 1/value instead of value in your previous code ?

---

<div class="post-metadata">

**Author:** ![blitt6](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@blitt6](https://forum.babylonjs.com/u/blitt6)\
**Post date:** [August 6, 2020, 3:43pm UTC](https://forum.babylonjs.com/t/refractive-textures-in-4-2-0-alpha-29/13118/7 "2020-08-06T15:43:07Z")

</div>

Which is the value that should be set to `1/value`? We are currently setting `indexOfRefraction` to 1.01 on our refractive subsurfaces, and `volumeIndexOfRefraction` to null. So, setting these to `1/value` doesn’t change anything for us.

Also, what is ETA?
