Set diffuse to black when constant lighting is used

This commit is contained in:
Sean Lilley 2017-03-14 12:06:50 -04:00
parent 5d0511b6a0
commit d46d58fdc5
1 changed files with 1 additions and 0 deletions

View File

@ -90,6 +90,7 @@ function createGltf(objData) {
if (!hasNormals) {
// Constant technique only factors in ambient and emission sources - set emission to diffuse
emission = diffuse;
diffuse = [0, 0, 0, 1];
}
var technique = hasNormals ? (hasSpecular ? 'PHONG' : 'LAMBERT') : 'CONSTANT';