Declarative, compilable 3D render control. 更多...
#include <RenderControl.h>
Public 成员函数 | |
| RenderControl () | |
| Renders control. | |
| ~RenderControl ()=default | |
| Renders control. | |
| RenderControl (const RenderControl &)=delete | |
| RenderControl & | operator= (const RenderControl &)=delete |
| void | attach (Graphics *gfx) |
| Attaches . | |
| Graphics * | getGraphics () const |
| Returns the graphics. | |
| bool | supports (const std::string &feature) const |
| Supports. | |
| void | enable (const std::string &feature) |
| Enables . | |
| void | disable (const std::string &feature) |
| Disables . | |
| bool | isEnabled (const std::string &feature) const |
| True when enabled. | |
| Result< void > | setLightingMode (LightingMode mode) |
| Request the opaque lighting strategy (transparent stays Forward+). | |
| Result< void > | setLightingMode (const std::string &name) |
| Request lighting mode by name: "forwardPlus" / "forward+" / "hybrid". | |
| LightingMode | getLightingMode () const |
| Return the caller-requested lighting mode (may differ from effective). | |
| LightingMode | getEffectiveLightingMode () const |
| Return the mode actually compiled into the pass list. @lifetime Valid after a successful compile(); equals ForwardPlus while dirty. | |
| bool | isDeferredLightingAvailable () const |
| True when deferredLighting can be inserted for Hybrid. Requires an attached Graphics backend that implements supportsDeferredLighting(). | |
| bool | hasHybridLightingFallback () const |
| True after compile() when Hybrid was requested but could not run (deferred lighting unavailable or GBuffer off) and ForwardPlus was used instead. Cleared on the next compile that keeps the requested Hybrid mode. | |
| Result< void > | applyLightingPreset (LightingPreset preset) |
| Apply a platform lighting preset (sets LightingMode; does not lock against later setLightingMode). | |
| Result< void > | applyLightingPreset (const std::string &name) |
| Apply preset by name: "desktop" / "mobile" / "ci". | |
| Result< void > | applySuggestedLightingPreset () |
| Apply suggestedLightingPreset(), then optional EVENGINE_LIGHTING_MODE override. | |
| LightingPreset | getLightingPreset () const |
| Last applied lighting preset (defaults to Desktop before any apply). | |
| void | setReflectionQuality (const std::string &quality) |
| Set the shared TAA/RTGI/SSR quality preset used by the automatic reflection chain. | |
| std::string | getReflectionQuality () const |
| Return the shared TAA/RTGI/SSR quality preset. | |
| void | setPostProcessQuality (const std::string &quality) |
| Set the unified post-process quality for TAA, RTGI and SSR. | |
| std::string | getPostProcessQuality () const |
| Return the unified post-process quality for TAA, RTGI and SSR. | |
| void | compile () |
| Rebuild the executable pass list from current feature flags. | |
| bool | isCompiled () const |
| True when compiled. | |
| bool | isDirty () const |
| True when dirty. | |
| int | getPassCount () const |
| Returns the pass count. | |
| std::string | getPassName (int index) const |
| Return the compiled pass name at index, or an empty string. | |
| bool | hasPass (const std::string &name) const |
| True when pass. | |
| GBuffer * | getGBuffer () |
| Returns the g buffer. | |
| const GBuffer * | getGBuffer () const |
| Returns the g buffer. | |
| void | ensureCompiled () |
| Ensure compiled; no-op when already clean. | |
详细描述
Declarative, compilable 3D render control.
Callers enable/disable string features, then compile() into an ordered pass list consumed by RenderSystem3D. Unknown feature names are ignored (supports() reports false).
Built-in features: "depthTest" — HW z-buffer on forward/gbuffer draws (default on) "shadow" — directional CSM shadow pass (default on) "gbuffer" — fill sampleable depth + normal buffers (on when ao/gi) "gbufferAlbedo" — also write albedo into GBuffer (implies gbuffer; on when gi) "forward" — lit forward / clustered mesh draws (default on) "hair" — transparent hair pass after opaque (default on) "clustered" — prefer clustered forward when light count > 8 (default on) "clusteredDeferred" — projection of LightingMode::Hybrid (enum is the source of truth) "ao" — screen-space AO overlay after FXAA resolve (implies gbuffer; default on) "outline" — screen-space model outline from depth+normal (implies gbuffer; default off) "frustumCull" — conservative bounding-sphere frustum culling during the job-ified frame data prep (default off; meshes without bounds are never culled) "gi" — enables gbufferAlbedo; mesh hemispheric GI (fullscreen SSGI is not auto-applied) "rtgi" — fullscreen real-time GI post pass (SSGI) overlay "aa" — FXAA resolve of the 3D scene color into the swapchain (default on) "taa" — full temporal AA with projection jitter, motion/depth reprojection, Catmull-Rom history, YCoCg variance clipping and adaptive sharpening; enabling it disables MSAA by default "msaa" — hardware MSAA on the 3D scene color pass (default on; sample count via Graphics.setMsaaSamples, default 4, clamped to device support) "ssr" — PBR-aware screen-space reflections with coarse/fine tracing and temporal denoise "rtx" — hardware Vulkan KHR ray-traced reflections when IRayTracing is available; otherwise a no-op (SSR remains the portable path) "reflectionChain"— enables TAA plus the complete RTGI then SSR lighting chain (default off) "decal" — screen-space decal layer pass between gbuffer and forward (implies gbuffer; default off) "atmosphere" — analytic sky/aerial-perspective pass (default on) "volumetricFog" — froxel media, lighting, integration and composite passes "fogLocalVolumes" — local volume injection (implies volumetricFog) "fogTemporal" — history filtering (implies volumetricFog)
Lighting mode (enum is authoritative; "clusteredDeferred" is a projection): LightingMode::ForwardPlus — today's clustered-forward opaque path (default) LightingMode::Hybrid — opaque clustered deferred + transparent Forward+ when the deferredLighting pass is available; otherwise compile() falls back observably to ForwardPlus (getEffectiveLightingMode() / hasHybridLightingFallback())
3D draws into a sampleable scene color target (not the swapchain). Present resolves that target (FXAA when "aa" is on), then composites AO/HUD.
compile() is idempotent; enable/disable mark the control dirty until the next compile(). RenderSystem3D auto-compiles when dirty.
在文件 RenderControl.h 第 68 行定义.
构造及析构函数说明
◆ RenderControl() [1/2]
| eve::graphics::RenderControl::RenderControl | ( | ) |
◆ ~RenderControl()
|
default |
Renders control.
◆ RenderControl() [2/2]
|
delete |
成员函数说明
◆ applyLightingPreset() [1/2]
| Result< void > eve::graphics::RenderControl::applyLightingPreset | ( | const std::string & | name | ) |
Apply preset by name: "desktop" / "mobile" / "ci".
- 返回
- Success, or Unsupported for unknown names.
在文件 RenderControl.cpp 第 125 行定义.
引用了 applyLightingPreset(), eve::graphics::Ci, eve::graphics::Desktop, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::graphics::Mobile, name , 以及 eve::Unsupported.
◆ applyLightingPreset() [2/2]
| Result< void > eve::graphics::RenderControl::applyLightingPreset | ( | LightingPreset | preset | ) |
Apply a platform lighting preset (sets LightingMode; does not lock against later setLightingMode).
- 参数
-
preset Desktop → Hybrid when deferred available, else ForwardPlus; Mobile/Ci → ForwardPlus.
- 返回
- Success. @thread Render-thread affine.
在文件 RenderControl.cpp 第 118 行定义.
引用了 eve::graphics::Desktop, eve::graphics::ForwardPlus, eve::graphics::Hybrid, isDeferredLightingAvailable() , 以及 setLightingMode().
被这些函数引用 applyLightingPreset() , 以及 applySuggestedLightingPreset().
◆ applySuggestedLightingPreset()
| Result< void > eve::graphics::RenderControl::applySuggestedLightingPreset | ( | ) |
Apply suggestedLightingPreset(), then optional EVENGINE_LIGHTING_MODE override.
- 返回
- Success from the last mode set (preset or env override).
在文件 RenderControl.cpp 第 134 行定义.
引用了 applyLightingPreset(), eve::graphics::lightingModeFromEnv(), setLightingMode() , 以及 eve::graphics::suggestedLightingPreset().
◆ attach()
| void eve::graphics::RenderControl::attach | ( | Graphics * | gfx | ) |
◆ compile()
| void eve::graphics::RenderControl::compile | ( | ) |
Rebuild the executable pass list from current feature flags.
在文件 RenderControl.cpp 第 241 行定义.
引用了 eve::graphics::ForwardPlus, eve::graphics::Hybrid, isDeferredLightingAvailable() , 以及 isEnabled().
被这些函数引用 ensureCompiled().
◆ disable()
| void eve::graphics::RenderControl::disable | ( | const std::string & | feature | ) |
Disables .
在文件 RenderControl.cpp 第 226 行定义.
◆ enable()
| void eve::graphics::RenderControl::enable | ( | const std::string & | feature | ) |
Enables .
在文件 RenderControl.cpp 第 224 行定义.
◆ ensureCompiled()
| void eve::graphics::RenderControl::ensureCompiled | ( | ) |
Ensure compiled; no-op when already clean.
在文件 RenderControl.cpp 第 272 行定义.
引用了 compile() , 以及 isCompiled().
◆ getEffectiveLightingMode()
|
inline |
Return the mode actually compiled into the pass list. @lifetime Valid after a successful compile(); equals ForwardPlus while dirty.
在文件 RenderControl.h 第 110 行定义.
◆ getGBuffer() [1/2]
|
inline |
Returns the g buffer.
在文件 RenderControl.h 第 170 行定义.
被这些函数引用 eve::graphics::webgpu::Graphics::endGBufferPass() , 以及 eve::graphics::RenderSystem3D::render().
◆ getGBuffer() [2/2]
|
inline |
Returns the g buffer.
在文件 RenderControl.h 第 172 行定义.
◆ getGraphics()
|
inline |
Returns the graphics.
在文件 RenderControl.h 第 81 行定义.
◆ getLightingMode()
|
inline |
Return the caller-requested lighting mode (may differ from effective).
在文件 RenderControl.h 第 105 行定义.
◆ getLightingPreset()
|
inline |
Last applied lighting preset (defaults to Desktop before any apply).
在文件 RenderControl.h 第 141 行定义.
◆ getPassCount()
|
inline |
Returns the pass count.
在文件 RenderControl.h 第 163 行定义.
◆ getPassName()
| std::string eve::graphics::RenderControl::getPassName | ( | int | index | ) | const |
Return the compiled pass name at index, or an empty string.
在文件 RenderControl.cpp 第 276 行定义.
引用了 index.
◆ getPostProcessQuality()
|
inline |
Return the unified post-process quality for TAA, RTGI and SSR.
在文件 RenderControl.h 第 153 行定义.
◆ getReflectionQuality()
|
inline |
Return the shared TAA/RTGI/SSR quality preset.
在文件 RenderControl.h 第 149 行定义.
◆ hasHybridLightingFallback()
|
inline |
True after compile() when Hybrid was requested but could not run (deferred lighting unavailable or GBuffer off) and ForwardPlus was used instead. Cleared on the next compile that keeps the requested Hybrid mode.
在文件 RenderControl.h 第 121 行定义.
◆ hasPass()
| bool eve::graphics::RenderControl::hasPass | ( | const std::string & | name | ) | const |
True when pass.
在文件 RenderControl.cpp 第 281 行定义.
◆ isCompiled()
|
inline |
◆ isDeferredLightingAvailable()
| bool eve::graphics::RenderControl::isDeferredLightingAvailable | ( | ) | const |
True when deferredLighting can be inserted for Hybrid. Requires an attached Graphics backend that implements supportsDeferredLighting().
在文件 RenderControl.cpp 第 92 行定义.
引用了 eve::graphics::Graphics::supportsDeferredLighting().
被这些函数引用 applyLightingPreset() , 以及 compile().
◆ isDirty()
|
inline |
True when dirty.
在文件 RenderControl.h 第 160 行定义.
◆ isEnabled()
| bool eve::graphics::RenderControl::isEnabled | ( | const std::string & | feature | ) | const |
True when enabled.
在文件 RenderControl.cpp 第 228 行定义.
被这些函数引用 compile() , 以及 eve::graphics::RenderSystem3D::render().
◆ operator=()
|
delete |
◆ setLightingMode() [1/2]
| Result< void > eve::graphics::RenderControl::setLightingMode | ( | const std::string & | name | ) |
Request lighting mode by name: "forwardPlus" / "forward+" / "hybrid".
- 返回
- Success, or Unsupported for unknown names (previous mode unchanged).
在文件 RenderControl.cpp 第 110 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::graphics::ForwardPlus, eve::graphics::Hybrid, name, setLightingMode() , 以及 eve::Unsupported.
◆ setLightingMode() [2/2]
| Result< void > eve::graphics::RenderControl::setLightingMode | ( | LightingMode | mode | ) |
Request the opaque lighting strategy (transparent stays Forward+).
- 参数
-
mode ForwardPlus or Hybrid.
- 返回
- Success. Hybrid may still fall back at compile() until deferred lighting ships. @thread Render-thread affine; no callbacks.
在文件 RenderControl.cpp 第 94 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::graphics::ForwardPlus, eve::graphics::Hybrid, eve::InvalidArgument , 以及 eve::Result< T >::success().
被这些函数引用 applyLightingPreset(), applySuggestedLightingPreset() , 以及 setLightingMode().
◆ setPostProcessQuality()
|
inline |
Set the unified post-process quality for TAA, RTGI and SSR.
在文件 RenderControl.h 第 151 行定义.
◆ setReflectionQuality()
| void eve::graphics::RenderControl::setReflectionQuality | ( | const std::string & | quality | ) |
Set the shared TAA/RTGI/SSR quality preset used by the automatic reflection chain.
- 参数
-
quality One of "low", "medium", "high" or "ultra"; unknown values use "high".
在文件 RenderControl.cpp 第 234 行定义.
◆ supports()
| bool eve::graphics::RenderControl::supports | ( | const std::string & | feature | ) | const |
Supports.
在文件 RenderControl.cpp 第 86 行定义.
该类的文档由以下文件生成:
- src/modules/graphics/RenderControl.h
- src/modules/graphics/RenderControl.cpp