Reputation: 57
First I set material's map (simple texture) and color for the mesh
mesh.material.map = .... mesh.material.color.set('#ff0000');
Then I want to set another texture
mesh.material.map = ....
The mesh became red, but texture is blue for example
How can I remove color from material?
Upvotes: 1
Views: 944
Reputation: 31026
If you don't want that the color
property to affect the texture's color, set it to its default value white. Meaning:
mesh.material.color.set( 0xffffff );
That works because the material's color and the sampled color of the diffuse texture are multiplied in order to produce the fragment's final color value.
Upvotes: 1