3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/renderer/chunks/point_lighting/ILightLODResourceProvider.h"
7#include "mc/client/renderer/chunks/point_lighting/PointLightShadowAtlasHysteresis.h"
8#include "mc/client/renderer/chunks/point_lighting/PointLightShadowBatchProcessor.h"
9#include "mc/deps/minecraft_renderer/framebuilder/PointLightShadowParameters.h"
10#include "mc/external/render_dragon/rendering/TextureCubeFace.h"
11#include "mc/world/level/BlockPos.h"
28namespace PointLighting {
31:
public ::PointLighting::ILightLODResourceProvider<::PointLighting::AnalyticLightResources> {
44 ::ll::TypedStorage<8, 8, uint64> mActiveProbeCount;
45 ::ll::TypedStorage<8, 8, uint64> mAllocatedFaceCount;
46 ::ll::TypedStorage<4, 4, uint> mGrowCount;
47 ::ll::TypedStorage<4, 4, uint> mShrinkCount;
48 ::ll::TypedStorage<4, 4, uint> mInvalidateCount;
49 ::ll::TypedStorage<4, 4, uint> mNewCount;
50 ::ll::TypedStorage<4, 4, uint> mConsecutiveFailureFrames;
51 ::ll::TypedStorage<1, 1, bool> mAtlasFull;
59 ::ll::TypedStorage<4, 4, uint> mConsecutiveFailureFrames;
60 ::ll::TypedStorage<1, 1, bool> mWasFullFlag;
61 ::ll::TypedStorage<1, 1, bool> mFailedThisFrame;
65 using ShadowProbeIndex = int;
67 using ProbeMap = ::std::unordered_map<::BlockPos, ::PointLighting::PointLightShadowProbe>;
72 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::dragon::atlas::IAtlasUserOperations>> mAtlasOps;
73 ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::PointLighting::PointLightShadowProbe>> mActiveProbes;
77 ::std::_List_const_iterator<::std::_List_val<
78 ::std::_List_simple_types<::std::pair<::BlockPos const, ::PointLighting::PointLightShadowProbe>>>>>
80 ::ll::TypedStorage<8, 88, ::PointLighting::PointLightShadowBatchProcessor> mBatchProcessor;
81 ::ll::TypedStorage<1, 1, ::PointLighting::PointLightShadowAtlasHysteresis> mAtlasHysteresis;
82 ::ll::TypedStorage<4, 8, ::PointLighting::PointLightShadowProbeManager::AtlasPressureState> mAtlasState;
83 ::ll::TypedStorage<8, 144, ::mce::framebuilder::PointLightShadowParameters> mLastParameters;
84 ::ll::TypedStorage<4, 4, int> mLastMaxPointLights;
85 ::ll::TypedStorage<8, 24, ::std::vector<::AABB>> mBlockRegionChanges;
86 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::dragon::atlas::IAtlasHandle>> mShadowAtlas;
87 ::ll::TypedStorage<8, 40, ::PointLighting::PointLightShadowProbeManager::ProbeDebugStats> mLastFrameStats;
93 virtual ~PointLightShadowProbeManager() =
default;
95 virtual bool atCapacity() const ;
97 virtual
bool canReserve(::BlockPos const&) const ;
100 acquired(::BlockPos const&, ::mce::PointLightParameters const&, ::PointLighting::AnalyticLightResources&) const
103 virtual
void beginTransition(
105 ::mce::PointLightParameters const&,
107 ::PointLighting::AnalyticLightResources&
110 virtual
void release(::BlockPos const&, ::PointLighting::AnalyticLightResources&) ;
112 virtual
void advance(::BlockPos const&, ::PointLighting::AnalyticLightResources&,
float) ;
114 virtual
void refresh(
116 ::mce::PointLightParameters const&,
117 ::PointLighting::AnalyticLightResources&
120 virtual
void finalize(::BlockPos const&, ::PointLighting::AnalyticLightResources&) ;
128 ::dragon::rendering::TextureCubeFace face,
140 ::mce::framebuilder::PointLightShadowParameters const& pointLightParameters,
141 ::glm::vec3 const& worldOrigin,
143 ::glm::vec3 const& cameraForward
150 ::dragon::rendering::TextureCubeFace face,
155 MCNAPI ::mce::framebuilder::ShadowAtlasFrameDescription
161 ::
Block const& block,
162 ::
Block const& oldBlock,
163 ::mce::framebuilder::PointLightShadowParameters const& pointLightParameters
Definition BlockSource.h:72
Definition FrustumCuller.h:5
Definition PointLightShadowProbeManager.h:7
MCAPI bool _resizeProbeFace(::PointLighting::PointLightShadowProbe &probe, ::dragon::rendering::TextureCubeFace face, ushort targetDim, uint64 nowMs)
MCAPI ::std::vector<::mce::framebuilder::ActiveShadowTileInfo > prepareActiveTiles(::glm::vec3 const &worldOrigin)
MCAPI void _freeProbeTiles(::PointLighting::PointLightShadowProbe &probe)
MCAPI void _processProbes(::mce::framebuilder::PointLightShadowParameters const &pointLightParameters, ::glm::vec3 const &worldOrigin, ::FrustumCuller const &frustumCuller, ::glm::vec3 const &cameraForward)
MCAPI::mce::framebuilder::ShadowAtlasFrameDescription getShadowFrameData(::mce::framebuilder::PointLightShadowParameters const &pointLightParameters)
MCAPI bool _isProbeRendered(::PointLighting::PointLightShadowProbe const &probe) const
MCAPI void _invalidateProbeTile(::PointLighting::PointLightShadowProbe &probe, ::dragon::rendering::TextureCubeFace face)
MCAPI void _allocateProbeTile(::PointLighting::PointLightShadowProbe &probe, ::dragon::rendering::TextureCubeFace face, ushort dimension)
MCAPI void onBlockChanged(::BlockSource &source, ::BlockPos const &blockPos, ::Block const &block, ::Block const &oldBlock, ::mce::framebuilder::PointLightShadowParameters const &pointLightParameters)
MCAPI void _reconfigureAtlasIfNeeded(::mce::framebuilder::PointLightShadowParameters const &pointLightParameters)
Definition PointLightShadowProbe.h:7
Definition IAtlasHandle.h:7
Definition IAtlasUserOperations.h:7
Definition AnalyticLightResources.h:7
Definition PointLightShadowProbeManager.h:18
Definition PointLightShadowProbeManager.h:16
Definition PointLightParameters.h:7
Definition ActiveShadowTileInfo.h:7
Definition ShadowAtlasFrameDescription.h:7