refractionTexture replaced by another texture named "opaqueSceneTexture"

I encountered a problem when using PBR material‘s refractionTexture,

In the PG, The code runs well。But the same code in my project, the box’s refractionTexture replaced by another texture named “opaqueSceneTexture”. I remember I didn’t create this texture before,Is there an error in my settings?

Hope for help, thank you :smile:

This is not an error, it is because you have loaded a glTF file in your scene, and this file uses the transmission extension.

In this case, the transmission effect is implemented by rendering the opaque objects in a separate pass and using this texture as a refraction texture for the transmissive materials.

1 Like

Yep,I loaded a glTF file in my project, This is the difference from PG, now my question is how to use the texture i created, in PG named “th”? or if loaded glTF, all refrationTexture must use “opaqueSceneTexture” :rofl:

The easiest way is to remove the transmission from the material in your DCC tool (Blender for eg).

Else, you can also retrieve the material programmatically and set your own refraction texture by code.

2 Likes