载入中...
搜索中...
未找到
RenderControl.cpp
浏览该文件的文档.
52 return feature == "gbuffer" || feature == "gbufferAlbedo" || feature == "ao" || feature == "gi" ||
53 feature == "outline" || feature == "contactShadow" || feature == "decal" || feature == "gpuDriven" ||
54 feature == "visResolve" || feature == "ssr" || feature == "rtgi" || feature == "reflectionChain" ||
55 feature == "rtx" || feature == "volumetricFog" || feature == "fogLocalVolumes" || feature == "fogTemporal";
100bool RenderControl::supports(const std::string &feature) const { return isKnownFeature(feature); }
127bool RenderControl::isDeferredLightingAvailable() const { return gfx_ != nullptr && gfx_->supportsDeferredLighting(); }
131 return Result<void>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "unknown LightingMode value",
146 if (name == "forwardPlus" || name == "forward+") return setLightingMode(LightingMode::ForwardPlus);
156 if (preset == LightingPreset::Desktop && isDeferredLightingAvailable()) mode = LightingMode::Hybrid;
200 if (gfx_ && (feature == "ssr" || feature == "rtgi" || feature == "reflectionChain" || feature == "rtx")) {
212 if ((feature == "ssr" || feature == "rtgi" || feature == "reflectionChain" || feature == "rtx") && enabled)
272 DiagnosticCode::Unsupported, "unknown render feature: " + feature, "graphics.RenderControl.feature"));
313 isEnabled("contactShadow") || isEnabled("outline") || isEnabled("decal") || isEnabled("rtgi") ||
314 isEnabled("ssr") || isEnabled("reflectionChain") || isEnabled("rtx") || isEnabled("volumetricFog"));
318 const bool canHybrid = wantHybrid && isDeferredLightingAvailable() && gbufferOn && !isEnabled("gpuDriven");
Stable, structured diagnostics shared by engine modules.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
void ignore(std::string_view reason={}) const noexcept
Explicitly discard this result after documenting the reason.
Definition Result.h:571
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
void invalidateTemporalHistory()
Discard TAA history after a render-chain discontinuity.
Definition AntiAliasing.cpp:415
void invalidateHistory()
Discard temporal GI history after a render-chain discontinuity.
Definition GlobalIllumination.h:67
Definition Graphics.h:134
ScreenSpaceReflection * pipelineScreenSpaceReflection()
Pipeline screen space reflection.
Definition Graphics.cpp:1786
GlobalIllumination * pipelineGlobalIllumination()
Pipeline global illumination.
Definition Graphics.cpp:1684
virtual bool supportsGBufferPost() const
Whether gbuffer-based post-process shaders (AO, GI) can be created on this backend....
Definition Graphics.h:260
virtual bool supportsDeferredLighting() const
True when the backend can run Hybrid clustered deferred lighting.
Definition Graphics.h:267
Result< void > setLightingMode(LightingMode mode)
Request the opaque lighting strategy (transparent stays Forward+).
Definition RenderControl.cpp:129
void compile()
Rebuild the executable pass list from current feature flags.
Definition RenderControl.cpp:305
Result< void > setLightingMode(const std::string &name)
Request lighting mode by name: "forwardPlus" / "forward+" / "hybrid".
Definition RenderControl.cpp:145
void enable(const std::string &feature)
Compatibility-only feature enablement; use requestFeature to observe failure.
Definition RenderControl.cpp:281
Result< void > applySuggestedLightingPreset()
Apply suggestedLightingPreset(), then optional EVENGINE_LIGHTING_MODE override.
Definition RenderControl.cpp:169
Result< void > setPathTracingSamples(uint32_t samples)
Set the automatic path renderer's independent samples per pixel per frame.
Definition RenderControl.cpp:111
void disable(const std::string &feature)
Compatibility-only feature disablement; use requestFeature to observe failure.
Definition RenderControl.cpp:286
Result< void > requestFeature(const std::string &feature, bool enabled)
Request a feature change with an observable Unsupported result when the backend cannot run it.
Definition RenderControl.cpp:269
bool isDeferredLightingAvailable() const
True when deferredLighting can be inserted for Hybrid. Requires an attached Graphics backend that imp...
Definition RenderControl.cpp:127
Result< void > setAutoInstancingPath(AutoInstancingPath path)
Select automatic opaque instancing without changing lighting or explicit gpuDriven requests.
Definition RenderControl.cpp:102
AutoInstancingPath
Automatic opaque batching route; explicit gpuDriven requests retain priority.
Definition RenderControl.h:77
Result< void > applyLightingPreset(LightingPreset preset)
Apply a platform lighting preset (sets LightingMode; does not lock against later setLightingMode).
Definition RenderControl.cpp:153
std::string getPassName(int index) const
Return the compiled pass name at index, or an empty string.
Definition RenderControl.cpp:348
void setReflectionQuality(const std::string &quality)
Set the shared TAA/RTGI/SSR quality preset used by the automatic reflection chain.
Definition RenderControl.cpp:298
void invalidateHistory()
Discard temporal reflection history after a render-chain discontinuity.
Definition ScreenSpaceReflection.h:54
void setEnabled(bool enabled)
Enable/disable the pass. When disabled it emits transparent (0 hit).
Definition ScreenSpaceReflection.cpp:182
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Result< LightingMode > lightingModeFromEnv()
Optional explicit mode from EVENGINE_LIGHTING_MODE=forwardPlus|hybrid.
Definition LightingMode.cpp:55
LightingPreset suggestedLightingPreset()
Suggest a lighting preset from OS, GPU type/name, and env.
Definition LightingMode.cpp:27
@ ForwardPlus
LightingPreset
Platform lighting quality preset (does not replace an explicit setLightingMode).
Definition LightingMode.h:31
@ InvalidArgument
@ Unsupported