-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
As the lights have to be extracted from the KHR_materials_common extension, here is a first try by example:
{
"lights": [
{
"ambient": {
"color": [
1,
1,
1
]
}
},
{
"directional": {
"color": [
1,
1,
1
]
}
},
{
"point": {
"color": [
1,
1,
1
],
"constantAttenuation": 1,
"linearAttenuation": 0.5,
"quadraticAttenuation": 0.25
}
},
{
"spot": {
"color": [
1,
1,
1
],
"constantAttenuation": 1,
"fallOffAngle": 40,
"fallOffExponent": 0,
"linearAttenuation": 0.5,
"quadraticAttenuation": 0.25
}
}
]
}
Directional, point and spot are obvious for PBR and non-PBR materials.
Regarding ambient and for PBR, this needs to be further discussed and explained. But I suggest to treat the value as if an environment map is used, which does have just this color.