change diffuseTexture of layer

Hi
if i change diffuseTexture of layer at the editor, then that is ok , but if i change diffuseTexture of layer at the runtime, then that will be glossy and smooth
why ?!

Post a code example.

layer.diffuseTexture = texture;