MCPcopy Create free account
hub / github.com/begla/Intrinsic / onCaptureProbe

Method onCaptureProbe

IntrinsicEd/src/IntrinsicEdNodeViewTreeWidget.cpp:720–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718}
719
720void IntrinsicEdNodeViewTreeWidget::onCaptureProbe()
721{
722 using namespace R;
723
724 Components::IrradianceProbeRef irradProbeRef;
725 Components::NodeRef probeNodeRef;
726 Entity::EntityRef currentEntity;
727
728 QTreeWidgetItem* currIt = currentItem();
729 if (currIt)
730 {
731 probeNodeRef = _itemToNodeMap[currIt];
732
733 const glm::uvec2 cubeMapRes =
734 R::RenderSystem::getAbsoluteRenderSize(R::RenderSize::kCubemap);
735 RenderSystem::_customBackbufferDimensions = cubeMapRes;
736 RenderSystem::resizeSwapChain(true);
737
738 for (uint32_t timeSampleIdx = 0u;
739 timeSampleIdx < _INTR_PROBE_TIME_SAMPLE_COUNT; ++timeSampleIdx)
740 Rendering::IBL::captureProbes(
741 {probeNodeRef}, timeSampleIdx == 0,
742 timeSampleIdx == _INTR_PROBE_TIME_SAMPLE_COUNT - 1,
743 timeSampleIdx / (float)_INTR_PROBE_TIME_SAMPLE_COUNT);
744
745 RenderSystem::_customBackbufferDimensions = glm::uvec2(0u);
746 RenderSystem::resizeSwapChain(true);
747 }
748}

Callers

nothing calls this directly

Calls 1

captureProbesFunction · 0.85

Tested by

no test coverage detected