rt(d3d11): draw final pass to output targets

This commit is contained in:
chyyran 2024-09-11 18:52:29 -04:00 committed by Ronny Chan
parent c9205bc922
commit 1bf5d7efca
2 changed files with 24 additions and 3 deletions

View file

@ -495,11 +495,32 @@ impl FilterChainD3D11 {
// try to hint the optimizer
assert_eq!(last.len(), 1);
if let Some(pass) = last.iter_mut().next() {
let index = passes_len - 1;
source.filter = pass.config.filter;
source.wrap_mode = pass.config.wrap_mode;
// Draw to output_framebuffers for proper handling of feedback.
let feedback_target = &self.output_framebuffers[index];
pass.draw(
&ctx,
passes_len - 1,
index,
&self.common,
pass.config.get_frame_count(frame_count),
options,
viewport,
&original,
&source,
RenderTarget::viewport_with_output(
&feedback_target.create_render_target_view()?,
viewport,
),
QuadType::Final,
)?;
pass.draw(
&ctx,
index,
&self.common,
pass.config.get_frame_count(frame_count),
options,

View file

@ -12,10 +12,10 @@ use librashader_runtime_d3d11::options::FilterChainOptionsD3D11;
// const FILTER_PATH: &str =
// "../test/Mega_Bezel_Packs/Duimon-Mega-Bezel/Presets/Advanced/Nintendo_GBA_SP/GBA_SP-[ADV]-[LCD-GRID].slangp";
const FILTER_PATH: &str = "../test/shaders_slang/crt/crt-royale.slangp";
// const FILTER_PATH: &str = "../test/shaders_slang/crt/crt-royale.slangp";
// const FILTER_PATH: &str = "../test/slang-shaders/test/history.slangp";
// const FILTER_PATH: &str = "../test/slang-shaders/test/feedback.slangp";
const FILTER_PATH: &str = "../test/shaders_slang/test/feedback.slangp";
// const FILTER_PATH: &str = "../test/shaders_slang/crt/crt-royale.slangp";
const IMAGE_PATH: &str = "../triangle.png";