Hey guys, I recenlty came up with a problem that I need to render a mesh with a texture unaffected by any light. I wish that the color of my mesh is completely equals to the original color from my texture image. My current scene has a point light and it affect the color of my mesh when I change my camera matrix.
The Following is a PG example, I wish that the ground mesh shows only the color of that image, just like the point light does not exist.
code:
var createScene = function () {
var scene = new BABYLON.Scene(engine);
var camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI/2, Math.PI / 3, 25, BABYLON.Vector3.Zero(), scene);
camera.attachControl(canvas, true);
var light = new BABYLON.PointLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
light.intensity = 0.7;
var groundWidth = 20;
var groundHeight = 10;
var ground = BABYLON.MeshBuilder.CreateGround("ground1", {width: groundWidth, height: groundHeight, subdivisions: 25}, scene);
//Create dynamic texture
var textureGround = new BABYLON.Texture('textures/grass.png', scene);
var materialGround = new BABYLON.StandardMaterial("Mat", scene);
materialGround.diffuseTexture = textureGround;
ground.material = materialGround;
return scene;
};