@NasimiAsl before, I could paint my terrain using CustomMaterial, but now when I paint, it happens strange thing when the dynamic texture is updated. (with texture.update(); line : 151)
Bug with CustomMaterial : http://www.babylonjs-playground.com/#FC4IX#96
By using StandardMaterial, it works. I think CustomMaterial has some concern to update the changes after compiling or adding light like the previous bug ..
Work with StandardMaterial http://www.babylonjs-playground.com/#1OQFOC#60