diff --git a/librashader-runtime-gl/src/filter_chain/filter_impl.rs b/librashader-runtime-gl/src/filter_chain/filter_impl.rs index aea776f..668c01e 100644 --- a/librashader-runtime-gl/src/filter_chain/filter_impl.rs +++ b/librashader-runtime-gl/src/filter_chain/filter_impl.rs @@ -361,12 +361,25 @@ impl FilterChainImpl { // 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.mip_filter = pass.config.filter; source.wrap_mode = pass.config.wrap_mode; + let target = &self.output_framebuffers[index]; pass.draw( - passes_len - 1, + index, + &self.common, + pass.config.get_frame_count(frame_count), + options, + viewport, + &original, + &source, + RenderTarget::viewport_with_output(target, viewport), + ); + + pass.draw( + index, &self.common, pass.config.get_frame_count(frame_count), options, diff --git a/librashader-runtime-gl/src/util.rs b/librashader-runtime-gl/src/util.rs index 4fcaad3..bfd3fe4 100644 --- a/librashader-runtime-gl/src/util.rs +++ b/librashader-runtime-gl/src/util.rs @@ -8,12 +8,7 @@ pub unsafe fn gl_compile_shader(stage: GLenum, source: &str) -> error::Result