# Custom material changed by pitch?

**URL:** <https://community.cesium.com/t/custom-material-changed-by-pitch/16191>\
**Category:** CesiumJS\
**Created:** [November 17, 2021, 10:07am UTC](https://community.cesium.com/t/custom-material-changed-by-pitch/16191 "2021-11-17T10:07:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecmatao](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/ecmatao/32/3476_2.png) [@ecmatao](https://community.cesium.com/u/ecmatao)\
**Post date:** [November 17, 2021, 10:07am UTC](https://community.cesium.com/t/custom-material-changed-by-pitch/16191/1 "2021-11-17T10:07:42Z")

</div>

I use GroundPrimitive to draw a rectangle and set primitive apperance with custom material。

I make a canvas image as fragment texture, here is simplified fragment source :

```auto
uniform sampler2D image;

czm_material czm_getMaterial(czm_materialInput materialInput){
     czm_material material = czm_getDefaultMaterial(materialInput);
     vec2 st = materialInput.st;
     vec4 colorImage = texture2D(image,st);
   
     material.diffuse = colorImage.rgb;
     material.alpha = colorImage.a;
     return material;
}

```

when i change pitch with middle wheel, i found the color of the rectangle change from light green to yellow, so strange.

before

![1](https://global.discourse-cdn.com/cesium/original/2X/9/9de0d09c5cf643089dcb50b6f363810d1ddf24d1.png)

after  
 ![2](https://global.discourse-cdn.com/cesium/original/2X/2/277135b158094abb326e20334f0f3852883ec43b.png)

I have tried set Cesium.Appearance property “flat” true, turn off scene.sun, shadows and disable global.lightning, disable fog.

Can anybody know what cause this change . Thank you very muck !!
