Fixes to lights. Oops.
This commit is contained in:
parent
ce2a9f8d85
commit
ffd6af3142
|
@ -120,10 +120,10 @@ int main(int argc, char* argv[]) {
|
|||
"Use KHR_materials_unlit extension to request an unlit shader.")
|
||||
->group("Materials");
|
||||
|
||||
app.add_flag(
|
||||
"--khr-lights-punctual",
|
||||
gltfOptions.useKHRLightsPunctual,
|
||||
"Use KHR_lights_punctual extension to request an unlit shader.");
|
||||
app.add_flag_function(
|
||||
"--no-khr-lights-punctual",
|
||||
[&](size_t count) { gltfOptions.useKHRLightsPunctual = (count == 0); },
|
||||
"Don't use KHR_lights_punctual extension to export FBX lights.");
|
||||
|
||||
app.add_flag(
|
||||
"--user-properties",
|
||||
|
|
|
@ -729,14 +729,14 @@ ModelData* Raw2Gltf(
|
|||
light.innerConeAngle,
|
||||
light.outerConeAngle));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < raw.GetNodeCount(); i++) {
|
||||
const RawNode& node = raw.GetNode(i);
|
||||
const auto nodeData = gltf->nodes.ptrs[i];
|
||||
for (int i = 0; i < raw.GetNodeCount(); i++) {
|
||||
const RawNode& node = raw.GetNode(i);
|
||||
const auto nodeData = gltf->nodes.ptrs[i];
|
||||
|
||||
if (node.lightIx >= 0) {
|
||||
// we lean on the fact that in this simple case, raw and gltf indexing are aligned
|
||||
nodeData->SetLight(node.lightIx);
|
||||
if (node.lightIx >= 0) {
|
||||
// we lean on the fact that in this simple case, raw and gltf indexing are aligned
|
||||
nodeData->SetLight(node.lightIx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue