CCameraFilter: Disable depth_write for FilterPipelines

This commit is contained in:
Luke Street 2020-09-29 01:34:04 -04:00
parent 1037b16c59
commit 8d15acb11d
2 changed files with 16 additions and 9 deletions

View File

@ -28,31 +28,38 @@ enum class EFilterType {
};
template <EFilterType FT, hsh::Compare ZComp = hsh::Always>
struct FilterPipeline : hsh::pipeline::pipeline<hsh::pipeline::color_attachment<>> {};
struct FilterPipeline : hsh::pipeline::pipeline<hsh::pipeline::color_attachment<>,
hsh::pipeline::depth_write<false>> {};
template <hsh::Compare ZComp>
struct FilterPipeline<EFilterType::Passthru, ZComp>
: hsh::pipeline::pipeline<hsh::pipeline::color_attachment<>, hsh::pipeline::depth_compare<ZComp>> {};
: hsh::pipeline::pipeline<hsh::pipeline::color_attachment<>, hsh::pipeline::depth_compare<ZComp>,
hsh::pipeline::depth_write<false>> {};
template <hsh::Compare ZComp>
struct FilterPipeline<EFilterType::Multiply, ZComp>
: hsh::pipeline::pipeline<MultiplyAttachment<false>, hsh::pipeline::depth_compare<ZComp>> {};
: hsh::pipeline::pipeline<MultiplyAttachment<false>, hsh::pipeline::depth_compare<ZComp>,
hsh::pipeline::depth_write<false>> {};
template <hsh::Compare ZComp>
struct FilterPipeline<EFilterType::Add, ZComp>
: hsh::pipeline::pipeline<AdditiveAttachment<false>, hsh::pipeline::depth_compare<ZComp>> {};
: hsh::pipeline::pipeline<AdditiveAttachment<false>, hsh::pipeline::depth_compare<ZComp>,
hsh::pipeline::depth_write<false>> {};
template <hsh::Compare ZComp>
struct FilterPipeline<EFilterType::Blend, ZComp>
: hsh::pipeline::pipeline<BlendAttachment<false>, hsh::pipeline::depth_compare<ZComp>> {};
: hsh::pipeline::pipeline<BlendAttachment<false>, hsh::pipeline::depth_compare<ZComp>,
hsh::pipeline::depth_write<false>> {};
template <hsh::Compare ZComp>
struct FilterPipeline<EFilterType::NoColor, ZComp>
: hsh::pipeline::pipeline<NoColorAttachmentExt<AlphaMode::AlphaReplace>, hsh::pipeline::depth_compare<ZComp>> {};
: hsh::pipeline::pipeline<NoColorAttachmentExt<AlphaMode::AlphaReplace>, hsh::pipeline::depth_compare<ZComp>,
hsh::pipeline::depth_write<false>> {};
template <hsh::Compare ZComp>
struct FilterPipeline<EFilterType::InvDstMultiply, ZComp>
: hsh::pipeline::pipeline<InvDstMultiplyAttachmentExt<AlphaMode::AlphaReplace>, hsh::pipeline::depth_compare<ZComp>> {};
: hsh::pipeline::pipeline<InvDstMultiplyAttachmentExt<AlphaMode::AlphaReplace>, hsh::pipeline::depth_compare<ZComp>,
hsh::pipeline::depth_write<false>> {};
enum class EFilterShape {
Fullscreen,

View File

@ -1,9 +1,9 @@
#include "Runtime/Graphics/Shaders/CCameraBlurFilter.hpp"
#include <algorithm>
#include <array>
#include <cmath>
#include "Runtime/Camera/CCameraFilter.hpp"
#include "Runtime/Graphics/CGraphics.hpp"
#include "CCameraBlurFilter.cpp.hshhead"
@ -11,7 +11,7 @@
namespace urde {
using namespace hsh::pipeline;
struct CCameraBlurFilterPipeline : pipeline<BlendAttachment<>, depth_write<false>> {
struct CCameraBlurFilterPipeline : FilterPipeline<EFilterType::Blend> {
CCameraBlurFilterPipeline(hsh::vertex_buffer<CCameraBlurFilter::Vert> vbo,
hsh::uniform_buffer<CCameraBlurFilter::Uniform> ubo,
hsh::render_texture2d tex) {