Dad72 Posted December 22, 2017 Share Posted December 22, 2017 @NasimiAsl When you create a light after the scene is loaded, the material is not updated. The texture is no longer visible. On my project TerrainEditor it becomes all black. We can also see the problem on this PG http://www.babylonjs-playground.com/#FC4IX#92 Thanks Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 22, 2017 Share Posted December 22, 2017 some of uniform ( defined in standard material shader frizzed after one time bind so you most find that parameter and update or re create your material i recommended recreate because we don't wanna hack main shader in standard material) if we wanna have fully custom material we need make shaderMaterial so that code can be a good solution http://www.babylonjs-playground.com/#FC4IX#95 Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 22, 2017 Author Share Posted December 22, 2017 I tested with a standardMateriel, and it works fine. I wanted to check if it was right with CustomMaeriel or not. http://www.babylonjs-playground.com/#M3GWM0 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 22, 2017 Author Share Posted December 22, 2017 Ok, your solution works Nasimi. Thank you NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 22, 2017 Share Posted December 22, 2017 good sample but i inherited some version of standard material for this part i don't know what hapend in this part in parent class i just inherited and attach some shader source i need know when update lights parameter and i find and update that list again Dad72 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.