# Custom PBR shader problems with materials

**URL:** <https://forum.playcanvas.com/t/custom-pbr-shader-problems-with-materials/42356>\
**Category:** Help & Support\
**Tags:** textures, materials, shaders\
**Created:** [June 9, 2026, 3:07pm UTC](https://forum.playcanvas.com/t/custom-pbr-shader-problems-with-materials/42356 "2026-06-09T15:07:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BetyVega](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/betyvega/32/38113_2.png) [@BetyVega](https://forum.playcanvas.com/u/BetyVega)\
**Post date:** [June 9, 2026, 3:07pm UTC](https://forum.playcanvas.com/t/custom-pbr-shader-problems-with-materials/42356/1 "2026-06-09T15:07:56Z")

</div>

Hi everyone, I’m looking for some advice about importing textures into PlayCanvas. Some of our textures change color slightly after being imported, or end up with a strange bluish glow/shine. The odd thing is that all of the textures are exported using the exact same settings, but only a few of them have this issue. Does anyone know what could be causing this or how to fix it?  
We are using a custom PBR shader using shader chunks. This is the metalness and gloss part…

```javascript
    metalnessPS: `    
    uniform sampler2D texture_metalnessMap;
    uniform float metalness;

    void getMetalness() {
        dMetalness = texture2D(texture_metalnessMap, vUv0 ).b;
        dMetalness *= metalness;
    }
    `,
        glossPS: `

    uniform sampler2D texture_glossMap;
    uniform vec4 roughChanges; //x static bool, y: black z:white w:contrast

    void getGlossiness() {
        dGlossiness = 1.0;
        dGlossiness *= texture2D(texture_glossMap, (vUv0)).g;

        if(roughChanges.x > 0.5){
            dGlossiness = mix(roughChanges.y,roughChanges.z,dGlossiness);
            dGlossiness *= roughChanges.z;
        }
        dGlossiness = 1.0 - dGlossiness;

    }

```

 ![image](https://forum-files-playcanvas-com.s3.dualstack.eu-west-1.amazonaws.com/original/3X/f/e/feb99f606b573d7f4036bb766cf603f9ccdf5c8d.jpeg)
