Skip to content
Snippets Groups Projects
Commit e537a34e authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

[#106] Switch motion vector visualisation sampler from linear to nearest

parent a82d4018
No related branches found
No related tags found
1 merge request!89Resolve "Indirect Dispatch"
...@@ -62,6 +62,12 @@ bool App::initialize() { ...@@ -62,6 +62,12 @@ bool App::initialize() {
vkcv::SamplerMipmapMode::LINEAR, vkcv::SamplerMipmapMode::LINEAR,
vkcv::SamplerAddressMode::CLAMP_TO_EDGE); vkcv::SamplerAddressMode::CLAMP_TO_EDGE);
m_nearestSampler = m_core.createSampler(
vkcv::SamplerFilterType::NEAREST,
vkcv::SamplerFilterType::NEAREST,
vkcv::SamplerMipmapMode::NEAREST,
vkcv::SamplerAddressMode::CLAMP_TO_EDGE);
m_renderTargets = createRenderTargets(m_core, m_windowWidth, m_windowHeight); m_renderTargets = createRenderTargets(m_core, m_windowWidth, m_windowHeight);
const int cameraIndex = m_cameraManager.addCamera(vkcv::camera::ControllerType::PILOT); const int cameraIndex = m_cameraManager.addCamera(vkcv::camera::ControllerType::PILOT);
...@@ -331,7 +337,7 @@ void App::run() { ...@@ -331,7 +337,7 @@ void App::run() {
motionVectorVisualisationDescriptorWrites.sampledImageWrites = { motionVectorVisualisationDescriptorWrites.sampledImageWrites = {
vkcv::SampledImageDescriptorWrite(0, visualisationInput) }; vkcv::SampledImageDescriptorWrite(0, visualisationInput) };
motionVectorVisualisationDescriptorWrites.samplerWrites = { motionVectorVisualisationDescriptorWrites.samplerWrites = {
vkcv::SamplerDescriptorWrite(1, m_linearSampler) }; vkcv::SamplerDescriptorWrite(1, m_nearestSampler) };
motionVectorVisualisationDescriptorWrites.storageImageWrites = { motionVectorVisualisationDescriptorWrites.storageImageWrites = {
vkcv::StorageImageDescriptorWrite(2, m_renderTargets.motionBlurOutput) }; vkcv::StorageImageDescriptorWrite(2, m_renderTargets.motionBlurOutput) };
......
...@@ -34,4 +34,5 @@ private: ...@@ -34,4 +34,5 @@ private:
RenderTargets m_renderTargets; RenderTargets m_renderTargets;
vkcv::SamplerHandle m_linearSampler; vkcv::SamplerHandle m_linearSampler;
vkcv::SamplerHandle m_nearestSampler;
}; };
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment