fix(ci): document Camera3D DOF bindings and Hd2dLook ownership
Source quality failed on undocumented setDepthOfField getters and on api-lifetime for newLook/newMiniatureLook (and a Doxygen false positive). Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
This commit is contained in:
2 files changed
+23
-7
No files matched your search
@@ -294,11 +294,15 @@ WebGPU 使用带 origin 的 `WriteTexture`;两者都不重建 Texture、采样
|
||||
|
||||
**源码:** [`src/modules/graphics/`](../../../src/modules/graphics/)
|
||||
**相关测试:** 在 [`test/`](../../../test/) 中搜索 `graphics`、`Camera2D`、`Camera3D`。
|
||||
### HDR 与反射探针绑定
|
||||
### HDR、景深与反射探针绑定
|
||||
|
||||
下列绑定用于 HDR 图像、反射探针采集/注册、天空环境、曝光、Bloom 与反射链质量控制:
|
||||
下列绑定用于 HDR 图像、反射探针采集/注册、天空环境、曝光、Bloom、Gaussian 景深(DOF)与反射链质量控制。
|
||||
`Camera3D.setDepthOfField(focusDistance, maxBlurPx, focusRange)` 配置最终 HDR resolve 上的可分离 Gaussian 景深;
|
||||
`maxBlurPx <= 0` 关闭效果。焦点平面用视空间距离表示;`getDofFocusDistance` / `getDofMaxBlur` /
|
||||
`getDofFocusRange` 读取当前参数。HD-2D 缩微感可配合 `hd2d.Hd2dLook` 一键写入(见 [HD2D](hd2d.md))。
|
||||
Cutout/masked 精灵需写入深度,DOF 才能正确对焦角色。
|
||||
|
||||
`applyConfiguredToCamera`、`applyToCamera`、`clearReflectionProbe`、`configureInfluence`、`filterAndPublish`、`getActiveCubemap`、`getAdaptiveFaceBudget`、`getAdaptiveFilterSamples`、`getBloomIntensity`、`getBloomThreshold`、`getCaptureClusteredLighting`、`getCaptureFarDistance`、`getCaptureLodDistanceScale`、`getCaptureMask`、`getCaptureTransparent`、`getCenterX`、`getCenterY`、`getCenterZ`、`getCount`、`getEnvProbeCenterX`、`getEnvProbeCenterY`、`getEnvProbeCenterZ`、`getEnvProbeExtentX`、`getEnvProbeExtentY`、`getEnvProbeExtentZ`、`getEnvironmentLighting`、`getEnvironmentLightingIntensity`、`getExposure`、`getFaceCanvas`、`getGpuBudgetMs`、`getInfluenceBlendDistance`、`getInfluenceExtentX`、`getInfluenceExtentY`、`getInfluenceExtentZ`、`getInfluenceIntensity`、`getInfluencePriority`、`getLastCandidateCount`、`getLastCapturedFaceCount`、`getLastFilterSampleCount`、`getLastPublishedCount`、`getLastSelectedCount`、`getMaxRoughness`、`getPendingFaceCount`、`getPostProcessQuality`、`getPublishedRevision`、`getReflectionCaptureEnabled`、`getReflectionCaptureMask`、`getReflectionProbeCount`、`getReflectionQuality`、`getRefreshInterval`、`getResolution`、`getResolutionScale`、`getRevision`、`getSelectionHysteresis`、`getSkyB`、`getSkyFaceColor`、`getSkyFaceTexture`、`getSkyFaceTextureScale`、`getSkyG`、`getSkyIntensity`、`getSkyR`、`getSmoothedGpuDurationMs`、`getStagedRevision`、`getStagingCubemap`、`getThickness`、`getTotalCapturedFaceCount`、`getUpdateMode`、`hasEnvProbe`、`isAutoExposure`、`isCaptureComplete`、`isCapturePending`、`isRecaptureQueued`、`newHDRImageData`、`newReflectionProbeCapture`、`newReflectionProbeRegistry`、`queueCapture`、`queueCaptureAABB`、`remove`、`reportGpuDurationMs`、`requestCapture`、`setAutoExposure`、`setBloom`、`setCaptureClusteredLighting`、`setCaptureLodDistanceScale`、`setCaptureMask`、`setCaptureTransparent`、`setEnvironmentLighting`、`setExposure`、`setGpuBudgetMs`、`setMaxRoughness`、`setReflectionCaptureEnabled`、`setReflectionCaptureMask`、`setReflectionProbe`、`setReflectionQuality`、`setRefreshInterval`、`setResolutionScale`、`setSelectionHysteresis`、`setSkyColor`、`setSkyFaceColor`、`setSkyFaceTexture`、`setSkyFaceTextureScale`、`setUpdateMode`、`stageCapturedFaces`、`tick`、`tickAdaptive`、`updateCamera`。
|
||||
`applyConfiguredToCamera`、`applyToCamera`、`clearReflectionProbe`、`configureInfluence`、`filterAndPublish`、`getActiveCubemap`、`getAdaptiveFaceBudget`、`getAdaptiveFilterSamples`、`getBloomIntensity`、`getBloomThreshold`、`getCaptureClusteredLighting`、`getCaptureFarDistance`、`getCaptureLodDistanceScale`、`getCaptureMask`、`getCaptureTransparent`、`getCenterX`、`getCenterY`、`getCenterZ`、`getCount`、`getDofFocusDistance`、`getDofFocusRange`、`getDofMaxBlur`、`getEnvProbeCenterX`、`getEnvProbeCenterY`、`getEnvProbeCenterZ`、`getEnvProbeExtentX`、`getEnvProbeExtentY`、`getEnvProbeExtentZ`、`getEnvironmentLighting`、`getEnvironmentLightingIntensity`、`getExposure`、`getFaceCanvas`、`getGpuBudgetMs`、`getInfluenceBlendDistance`、`getInfluenceExtentX`、`getInfluenceExtentY`、`getInfluenceExtentZ`、`getInfluenceIntensity`、`getInfluencePriority`、`getLastCandidateCount`、`getLastCapturedFaceCount`、`getLastFilterSampleCount`、`getLastPublishedCount`、`getLastSelectedCount`、`getMaxRoughness`、`getPendingFaceCount`、`getPostProcessQuality`、`getPublishedRevision`、`getReflectionCaptureEnabled`、`getReflectionCaptureMask`、`getReflectionProbeCount`、`getReflectionQuality`、`getRefreshInterval`、`getResolution`、`getResolutionScale`、`getRevision`、`getSelectionHysteresis`、`getSkyB`、`getSkyFaceColor`、`getSkyFaceTexture`、`getSkyFaceTextureScale`、`getSkyG`、`getSkyIntensity`、`getSkyR`、`getSmoothedGpuDurationMs`、`getStagedRevision`、`getStagingCubemap`、`getThickness`、`getTotalCapturedFaceCount`、`getUpdateMode`、`hasEnvProbe`、`isAutoExposure`、`isCaptureComplete`、`isCapturePending`、`isRecaptureQueued`、`newHDRImageData`、`newReflectionProbeCapture`、`newReflectionProbeRegistry`、`queueCapture`、`queueCaptureAABB`、`remove`、`reportGpuDurationMs`、`requestCapture`、`setAutoExposure`、`setBloom`、`setCaptureClusteredLighting`、`setCaptureLodDistanceScale`、`setCaptureMask`、`setCaptureTransparent`、`setDepthOfField`、`setEnvironmentLighting`、`setExposure`、`setGpuBudgetMs`、`setMaxRoughness`、`setReflectionCaptureEnabled`、`setReflectionCaptureMask`、`setReflectionProbe`、`setReflectionQuality`、`setRefreshInterval`、`setResolutionScale`、`setSelectionHysteresis`、`setSkyColor`、`setSkyFaceColor`、`setSkyFaceTexture`、`setSkyFaceTextureScale`、`setUpdateMode`、`stageCapturedFaces`、`tick`、`tickAdaptive`、`updateCamera`。
|
||||
|
||||
### 预编译网格 Shader 与画布快照
|
||||
|
||||
|
||||
+16
-4
@@ -264,8 +264,8 @@ private:
|
||||
* @brief HD-2D presentation look inspired by HD2DURP (DOF + bloom + pixel sampling).
|
||||
*
|
||||
* Applies camera post settings for the miniature look and nearest-neighbor
|
||||
* filtering on sprite/terrain atlases. Depth-of-field requires sprites to write
|
||||
* depth (Sprite3D masked cutout / DopFix path).
|
||||
* filtering on sprite/terrain atlases. Depth-of-field needs Sprite3D masked
|
||||
* cutout / DopFix depth writes so the focus plane can resolve.
|
||||
*/
|
||||
class Hd2dLook {
|
||||
public:
|
||||
@@ -290,6 +290,8 @@ public:
|
||||
/**
|
||||
* @brief Write DOF + bloom onto a Camera3D (render-thread).
|
||||
* @param camera Non-null active scene camera.
|
||||
* @ownership `camera` is borrowed; Hd2dLook does not retain it.
|
||||
* @lifetime `camera` must remain valid only for this call.
|
||||
*/
|
||||
void apply(graphics::Camera3D *camera) const;
|
||||
|
||||
@@ -297,6 +299,8 @@ public:
|
||||
* @brief Point-filter a texture for crisp pixel art (nearest / no mip).
|
||||
* @param gfx Active Graphics.
|
||||
* @param texture Atlas or sprite sheet.
|
||||
* @ownership `gfx` and `texture` are borrowed; Hd2dLook does not retain them.
|
||||
* @lifetime Both arguments must remain valid only for this call.
|
||||
*/
|
||||
void applyPixelSampler(graphics::Graphics *gfx, graphics::Texture *texture) const;
|
||||
|
||||
@@ -326,9 +330,17 @@ public:
|
||||
TileMap3D *newTileMap3D();
|
||||
/** @brief Create a 3D billboard sprite bound to the given Graphics. */
|
||||
Sprite3D *newSprite(graphics::Graphics *gfx);
|
||||
/** @brief Create an HD-2D look preset (caller owns). */
|
||||
/**
|
||||
* @brief Create an HD-2D look preset with soft defaults.
|
||||
* @ownership Caller owns the returned object and must delete it.
|
||||
* @lifetime Valid until the caller deletes it; independent of Hd2D.
|
||||
*/
|
||||
Hd2dLook *newLook();
|
||||
/** @brief Create the miniature (strong DOF) look preset (caller owns). */
|
||||
/**
|
||||
* @brief Create the miniature (strong DOF) look preset.
|
||||
* @ownership Caller owns the returned object and must delete it.
|
||||
* @lifetime Valid until the caller deletes it; independent of Hd2D.
|
||||
*/
|
||||
Hd2dLook *newMiniatureLook();
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user