载入中...
搜索中...
未找到
ShadowScheme.h
浏览该文件的文档.
22[[nodiscard]] EVENGINE_API_BACKENDS Result<ShadowMethod> parseShadowMethod(std::string_view name);
33[[nodiscard]] EVENGINE_API_BACKENDS Result<ShadowMethod> resolveShadowMethod(std::string_view lightType,
154[[nodiscard]] EVENGINE_API_BACKENDS AdaptiveCascadeAllocation allocateAdaptiveCascadeResolutions(
162[[nodiscard]] EVENGINE_API_BACKENDS float estimateCascadeScreenCoverage(const glm::vec3& eye, const glm::vec3& target,
189[[nodiscard]] EVENGINE_API_BACKENDS Result<void> setShadowSchemeMapSizes(int directionalMapSize, int localMapSize = -1);
195[[nodiscard]] EVENGINE_API_BACKENDS Result<void> setShadowSchemeDirectionalMaxDistance(float meters);
231[[nodiscard]] EVENGINE_API_BACKENDS Result<glm::mat4> buildPointShadowFaceVP(const glm::vec3& position,
Move-only, checked operation results for the common layer.
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
void selectShadowCasters(const std::vector< Light3D::Data * > &lights, const std::vector< bool > &isPointFlags, const ShadowSchemeSettings &settings, const ShadowPagingView &view, Light3D::Data *&directionalCaster, std::vector< LocalShadowSlot > &localSlots)
Select directional CSM caster + paged local spot slots for one frame.
Definition Shadow.cpp:500
glm::mat4 buildSpotShadowVP(const glm::vec3 &position, const glm::vec3 &direction, float range, float outerAngleDeg)
Build a perspective light VP for a spot caster (Vulkan RH, ZO depth).
Definition Shadow.cpp:440
constexpr int kMaxShadowMapSize
Largest supported shadow-map edge length.
Definition ShadowScheme.h:169
AdaptiveCascadeAllocation allocateAdaptiveCascadeResolutions(int atlasSize, const float(&splitEnds)[ShadowConfig::kCascades+1], const float(&screenCoverage)[ShadowConfig::kCascades], const ShadowSchemeSettings &settings)
Distribute atlas resolution across cascades by distance + screen coverage.
Definition Shadow.cpp:321
float scoreSpotShadowCandidate(const Light3D::Data &light, const ShadowPagingView &view, const ShadowSchemeSettings &settings, bool hadSlot)
Score a spot caster for local-shadow paging (higher = more important).
Definition Shadow.cpp:470
int shadowMapSizeForResolutionTier(int resolutionTier)
Map PhotoMode m_shadowResolution (0..3) to an atlas edge length.
Definition Shadow.cpp:233
void resetShadowLocalPageCache()
Clear sticky local-page cache (tests / scheme resets).
Definition Shadow.cpp:381
Result< ShadowMethod > resolveShadowMethod(std::string_view lightType, ShadowMethod requested)
Resolve Auto / validate an explicit method for a concrete light type.
Definition Shadow.cpp:412
float estimateCascadeScreenCoverage(const glm::vec3 &eye, const glm::vec3 &target, const glm::vec3 &up, float fovYRad, float aspect, float nearZ, float farZ)
Estimate how much of the screen a cascade frustum slice covers.
Definition Shadow.cpp:286
const char * shadowMethodName(ShadowMethod method)
Canonical lowercase name for a ShadowMethod (auto, none, csm, …).
Definition Shadow.cpp:401
Result< glm::mat4 > buildPointShadowFaceVP(const glm::vec3 &position, int faceIndex, float range)
Build one cube-face light VP for a point caster.
Definition Shadow.cpp:452
int clampShadowMapSize(int size)
Clamp/round a requested map size to an allowed power-of-two.
Definition Shadow.cpp:218
constexpr int kMinShadowMapSize
Smallest supported shadow-map edge length.
Definition ShadowScheme.h:167
Result< void > setShadowSchemeMapSizes(int directionalMapSize, int localMapSize)
Apply directional (and optional local) map sizes with validation. @cost Cheap CPU clamp; GPU recreate...
Definition Shadow.cpp:253
Result< void > setShadowSchemeDirectionalMaxDistance(float meters)
Apply CSM max distance with validation.
Definition Shadow.cpp:269
ShadowMethod
How a Light3D produces real-time shadows. Auto resolves per light type (dir→CSM, spot→perspective,...
Definition Shadow.h:14
Result< ShadowMethod > parseShadowMethod(std::string_view name)
Parse a script/editor method name into ShadowMethod.
Definition Shadow.cpp:387
Per-cascade effective map sizes chosen for one CSM build. @ownership Value type; copied into ShadowUp...
Definition ShadowScheme.h:139
int sizes[ShadowConfig::kCascades]
Definition ShadowScheme.h:140
One allocated local (spot/point-face) shadow slot for the frame. @ownership Ephemeral CPU descriptor;...
Definition ShadowScheme.h:201
bool needsUpdate
When false, skip the shadow pass and keep the cached depth layer.
Definition ShadowScheme.h:211
Camera context used to score local shadow candidates for atlas paging. @ownership Ephemeral; valid on...
Definition ShadowScheme.h:40
glm::mat4 viewProj
Camera view-projection (Vulkan RH, ZO) for soft frustum scoring.
Definition ShadowScheme.h:43
Process-wide defaults for creating shadows per light family.
Definition ShadowScheme.h:67