BabylonJS / Extensions

Extensions for Babylon.js
177 stars 157 forks source link

Toggling scene.shadowsEnabled causes CustomMaterial to turn black #123

Closed zhutq closed 5 years ago

zhutq commented 6 years ago

Playground: https://www.babylonjs-playground.com/#TVPTC8#1 Either true to false or false to true causes the problem. Default material does not have this issue.

NasimiAsl commented 6 years ago

i check it tomorrow sorry i see it now

NasimiAsl commented 6 years ago

https://www.babylonjs-playground.com/#TVPTC8#2

as you see this is not shadow problem after you enableShadow change material.effect.setUniform is not work and maybe others can explain what happen because i don't know about default material mechanism

zhutq commented 6 years ago

https://www.babylonjs-playground.com/#TVPTC8#3 Even without setUniform the ground turns black after enableShadow changes. So I guess maybe there's something wrong with the uniform buffer of the material..? May I ask @deltakosh for some help?

NasimiAsl commented 6 years ago

https://www.babylonjs-playground.com/#TVPTC8#4