diff --git a/projects/indirect_dispatch/resources/shaders/motionVectorMax.comp b/projects/indirect_dispatch/resources/shaders/motionVectorMax.comp index f5a9fa3bfb41f6f247604f1528d19245fe6c2253..725fc3f4abd8fb2c07b3a0643f603ea9929bcbcb 100644 --- a/projects/indirect_dispatch/resources/shaders/motionVectorMax.comp +++ b/projects/indirect_dispatch/resources/shaders/motionVectorMax.comp @@ -7,7 +7,7 @@ layout(set=0, binding=2, rgba8) uniform image2D outMotionMax; layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in; -const int motionTileSize = 8; +const int motionTileSize = 20; void main(){ diff --git a/projects/indirect_dispatch/src/App.cpp b/projects/indirect_dispatch/src/App.cpp index bd65d314a92e787d7bac2b343d364df0126e41ba..0856173a8ab7fc1541d7185ce4fa786ded0c2518 100644 --- a/projects/indirect_dispatch/src/App.cpp +++ b/projects/indirect_dispatch/src/App.cpp @@ -201,8 +201,8 @@ void App::run() { m_core.prepareImageForStorage(cmdStream, m_renderTargets.motionMax); const uint32_t motionTileDispatchCounts[3] = { - (m_core.getImageWidth( m_renderTargets.motionMax) + AppConfig::maxMotionTileSize - 1) / AppConfig::maxMotionTileSize, - (m_core.getImageHeight(m_renderTargets.motionMax) + AppConfig::maxMotionTileSize - 1) / AppConfig::maxMotionTileSize, + (m_core.getImageWidth( m_renderTargets.motionMax) + 7) / 8, + (m_core.getImageHeight(m_renderTargets.motionMax) + 7) / 8, 1 }; m_core.recordComputeDispatchToCmdStream( diff --git a/projects/indirect_dispatch/src/AppConfig.hpp b/projects/indirect_dispatch/src/AppConfig.hpp index 877a1dd3f8f9f189137023adb9c9bf6e17212445..370b968479d92f2bdd54a7f9ab8fa7547050b1e0 100644 --- a/projects/indirect_dispatch/src/AppConfig.hpp +++ b/projects/indirect_dispatch/src/AppConfig.hpp @@ -7,5 +7,5 @@ namespace AppConfig{ const vk::Format depthBufferFormat = vk::Format::eD32Sfloat; const vk::Format colorBufferFormat = vk::Format::eB10G11R11UfloatPack32; const vk::Format motionBufferFormat = vk::Format::eR16G16Sfloat; - const uint32_t maxMotionTileSize = 8; + const uint32_t maxMotionTileSize = 20; // must match "motionTileSize" in motionVectorMax.comp } \ No newline at end of file