diff --git a/src/dxvk/rtx_render/rtx_game_capturer.cpp b/src/dxvk/rtx_render/rtx_game_capturer.cpp index fbb55da68..d4339986c 100644 --- a/src/dxvk/rtx_render/rtx_game_capturer.cpp +++ b/src/dxvk/rtx_render/rtx_game_capturer.cpp @@ -397,16 +397,23 @@ namespace dxvk { for (const RtInstance* pRtInstance : m_sceneManager.getInstanceTable()) { assert(pRtInstance->getBlas() != nullptr); + const XXH64_hash_t instanceId = pRtInstance->getId(); + if (instanceId == UINT64_MAX) { + // Ignore "virtual" instances, as they are used primarily for special render + // passes, rather than representing real entities that we want captured + continue; + } + assert(instanceId != UINT64_MAX); + if (pRtInstance->getBlas()->input.cameraType == CameraType::Sky) { if (!m_pCap->bSkyProbeBaked) { - const std::string skyProbeFilname = getBakedSkyProbeName(m_pCap->instance.stageName); - m_exporter.bakeSkyProbe(ctx, BASE_DIR + lss::commonDirName::texDir, skyProbeFilname); + const std::string skyProbeFilename = getBakedSkyProbeName(m_pCap->instance.stageName); + m_exporter.bakeSkyProbe(ctx, BASE_DIR + lss::commonDirName::texDir, skyProbeFilename); m_pCap->bSkyProbeBaked = true; - Logger::debug("[GameCapturer][" + m_pCap->idStr + "][SkyProbe] Bake scheduled to " + skyProbeFilname); + Logger::debug("[GameCapturer][" + m_pCap->idStr + "][SkyProbe] Bake scheduled to " + skyProbeFilename); } } - const XXH64_hash_t instanceId = pRtInstance->getId(); const uint8_t instanceFlags = m_pCap->instanceFlags[instanceId]; const bool bIsNew = m_pCap->instances.count(instanceId) == 0; const bool bPointsUpdate = checkInstanceUpdateFlag(instanceFlags, InstFlag::PositionsUpdate); diff --git a/src/dxvk/rtx_render/rtx_instance_manager.h b/src/dxvk/rtx_render/rtx_instance_manager.h index 3b2322d2e..165b79b4d 100644 --- a/src/dxvk/rtx_render/rtx_instance_manager.h +++ b/src/dxvk/rtx_render/rtx_instance_manager.h @@ -154,6 +154,9 @@ class RtInstance { void onTransformChanged(); friend class InstanceManager; + // Unique ID of the RtInstance. + // Sentinel value UINT64_MAX indicates that such RtInstance is a "virtual" instance, and is ignored by some features, + // most notably the GameCapturer const uint64_t m_id; mutable uint32_t m_instanceVectorId; // Index within instance vector in instance manager