@@ -1403,11 +1403,6 @@ inline core::smart_refctd_ptr<asset::ICPUDescriptorSet> CMitsubaLoader::createDS
1403
1403
auto baseInstanceDataIt = meshMeta->m_instances .begin ();
1404
1404
for (const auto & inst : meshMeta->m_instanceAuxData )
1405
1405
{
1406
- // @Crisspl IIRC lights in mitsuba have "sides"
1407
- // TODO: address the comment!
1408
- // i think it's just that backside of an area emitter does not emit, docs doesnt say anything about this
1409
- emissive = inst.frontEmitter .type ==CElementEmitter::AREA ? inst.frontEmitter .area .radiance : core::vectorSIMDf (0 .f );
1410
-
1411
1406
nbl_glsl_ext_Mitsuba_Loader_instance_data_t instData;
1412
1407
1413
1408
instData.tform = baseInstanceDataIt->worldTform ;
@@ -1429,6 +1424,7 @@ inline core::smart_refctd_ptr<asset::ICPUDescriptorSet> CMitsubaLoader::createDS
1429
1424
// ofile << "Debug print front BSDF with id = " << inst.bsdf_id << std::endl;
1430
1425
// _ctx.backend.debugPrint(ofile, streams, _compResult, &_ctx.backend_ctx);
1431
1426
#endif
1427
+ const auto emissive = inst.frontEmitter .type ==CElementEmitter::AREA ? inst.frontEmitter .area .radiance :core::vectorSIMDf (0 .f );
1432
1428
instData.material .front = impl_backendToGLSLStream (emissive,streams);
1433
1429
}
1434
1430
streams_it = _compResult.streams .find (bsdf_back);
@@ -1442,6 +1438,7 @@ inline core::smart_refctd_ptr<asset::ICPUDescriptorSet> CMitsubaLoader::createDS
1442
1438
// ofile << "Debug print back BSDF with id = " << inst.bsdf_id << std::endl;
1443
1439
// _ctx.backend.debugPrint(ofile, streams, _compResult, &_ctx.backend_ctx);
1444
1440
#endif
1441
+ const auto emissive = inst.backEmitter .type ==CElementEmitter::AREA ? inst.backEmitter .area .radiance :core::vectorSIMDf (0 .f );
1445
1442
instData.material .back = impl_backendToGLSLStream (emissive,streams);
1446
1443
}
1447
1444
0 commit comments