feat(graphics): enhance rendering capabilities with 3D pipeline and ambient occlusion

- Added a new 3D rendering pipeline section in the documentation, detailing initialization, VKBuilder, and asynchronous frame handling.
- Updated the Ambient Occlusion module to support depth-based sampling, allowing for improved visual fidelity in 3D scenes.
- Introduced new shader functionalities for ambient occlusion and global illumination, enhancing the overall rendering quality.
- Updated GBuffer to include hardware depth texture for more accurate depth sampling in 3D rendering.
- Enhanced the RenderControl to manage new features for ambient occlusion and global illumination, ensuring they are enabled by default.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
This commit is contained in:
西风逍遥游 committed 2026-08-13 10:01:04 +08:00
1 parent 973ad214ac
commit 2e32afd71b
50 files changed
+5525 -2308

No files matched your search

+22
View File
@@ -38,6 +38,9 @@ TEST_CASE("material.shadingModelAndParams") {
TEST_CASE("renderControl.compileFeaturesToPasses") {
RenderControl rc;
CHECK(rc.supports("gbuffer"));
CHECK(rc.supports("ao"));
CHECK(rc.supports("gi"));
CHECK(rc.supports("aa"));
CHECK(rc.supports("shadow"));
CHECK(!rc.supports("deferred"));
@@ -46,7 +49,19 @@ TEST_CASE("renderControl.compileFeaturesToPasses") {
CHECK(rc.hasPass("shadow"));
CHECK(rc.hasPass("forward"));
CHECK(rc.hasPass("hair"));
CHECK(rc.hasPass("gbuffer"));
CHECK(rc.isEnabled("ao"));
CHECK(rc.isEnabled("gi"));
CHECK(rc.isEnabled("aa"));
rc.disable("ao");
rc.disable("gi");
rc.disable("gbuffer");
CHECK(rc.isDirty());
rc.compile();
CHECK(!rc.hasPass("gbuffer"));
CHECK(!rc.isEnabled("ao"));
CHECK(!rc.isEnabled("gi"));
rc.enable("gbuffer");
CHECK(rc.isDirty());
@@ -116,8 +131,15 @@ TEST_CASE("gbuffer.bufferQueries") {
CHECK(gb.hasBuffer("normal"));
CHECK(gb.hasBuffer("albedo"));
CHECK(gb.getBuffer("depth") == &depth);
CHECK(!gb.hasBuffer("hwDepth"));
CHECK(gb.getBuffer("missing") == nullptr);
Texture hw;
gb.setTargets(128, 96, &depth, &normal, &albedo, &hw);
CHECK(gb.hasBuffer("hwDepth"));
CHECK(gb.getHwDepthTexture() == &hw);
CHECK(gb.getBuffer("hwDepth") == &hw);
gb.clear();
CHECK(!gb.isValid());
}