From 0d20133e8e9629b717e5a9550335f8f5a7cb7ed2 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Wed, 11 Dec 2024 18:06:08 -0300 Subject: [PATCH] Mipmaps Gen: default load/store depth & stencil actions to dont_care CompositorPassMipmap doesn't even call setRenderPassDescToCurrent(), however setting up the RTV is still important for analyzeBarriers() to do its job properly. But we don't use the depth or stencil buffers at all. This reverts commit 4948d0a1235a0402f7552e664be559ef01ad85bd since it does the same job, but cleaner. --- .../PassMipmap/OgreCompositorPassMipmapDef.h | 4 ++++ .../Compositors/PlanarReflections.compositor | 10 ---------- .../ScreenSpaceReflections.compositor | 10 ---------- .../GpuNormalMapper.compositor | 20 ------------------- 4 files changed, 4 insertions(+), 40 deletions(-) diff --git a/OgreMain/include/Compositor/Pass/PassMipmap/OgreCompositorPassMipmapDef.h b/OgreMain/include/Compositor/Pass/PassMipmap/OgreCompositorPassMipmapDef.h index 2c6aec23418..f7d6fe6d78a 100644 --- a/OgreMain/include/Compositor/Pass/PassMipmap/OgreCompositorPassMipmapDef.h +++ b/OgreMain/include/Compositor/Pass/PassMipmap/OgreCompositorPassMipmapDef.h @@ -80,6 +80,10 @@ namespace Ogre mGaussianDeviationFactor( 0.5f ), mKernelRadius( 8 ) { + mLoadActionDepth = LoadAction::DontCare; + mLoadActionStencil = LoadAction::DontCare; + mStoreActionDepth = StoreAction::DontCare; + mStoreActionStencil = StoreAction::DontCare; } }; diff --git a/Samples/Media/2.0/scripts/Compositors/PlanarReflections.compositor b/Samples/Media/2.0/scripts/Compositors/PlanarReflections.compositor index 8f33a92558f..9079edd1751 100644 --- a/Samples/Media/2.0/scripts/Compositors/PlanarReflections.compositor +++ b/Samples/Media/2.0/scripts/Compositors/PlanarReflections.compositor @@ -57,16 +57,6 @@ compositor_node PlanarReflectionsReflectiveRenderingNode pass generate_mipmaps { - load - { - depth dont_care - stencil dont_care - } - store - { - depth dont_care - stencil dont_care - } mipmap_method compute_hq profiling_id "Mipmap Generation (HQ)" diff --git a/Samples/Media/2.0/scripts/Compositors/ScreenSpaceReflections.compositor b/Samples/Media/2.0/scripts/Compositors/ScreenSpaceReflections.compositor index 5dce7318dec..d40dfdf60a5 100644 --- a/Samples/Media/2.0/scripts/Compositors/ScreenSpaceReflections.compositor +++ b/Samples/Media/2.0/scripts/Compositors/ScreenSpaceReflections.compositor @@ -184,16 +184,6 @@ compositor_node ScreenSpaceReflectionsPostprocessNode pass generate_mipmaps { - load - { - depth dont_care - stencil dont_care - } - store - { - depth dont_care - stencil dont_care - } mipmap_method compute_hq } } diff --git a/Samples/Media/2.0/scripts/materials/Tutorial_Terrain/GpuNormalMapper.compositor b/Samples/Media/2.0/scripts/materials/Tutorial_Terrain/GpuNormalMapper.compositor index 89e7d85c629..6e54c28140f 100644 --- a/Samples/Media/2.0/scripts/materials/Tutorial_Terrain/GpuNormalMapper.compositor +++ b/Samples/Media/2.0/scripts/materials/Tutorial_Terrain/GpuNormalMapper.compositor @@ -11,16 +11,6 @@ compositor_node Terra/GpuNormalMapper pass generate_mipmaps { - load - { - depth dont_care - stencil dont_care - } - store - { - depth dont_care - stencil dont_care - } } } } @@ -43,16 +33,6 @@ compositor_node Terra/GpuNormalMapperU16 pass generate_mipmaps { - load - { - depth dont_care - stencil dont_care - } - store - { - depth dont_care - stencil dont_care - } } } }