mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-23 16:44:05 -05:00
Set diffuse to black when constant lighting is used
This commit is contained in:
parent
5d0511b6a0
commit
d46d58fdc5
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user