diff --git a/splatter_wgpu/src/render_pass.rs b/splatter_wgpu/src/render_pass.rs index 00a44409..d69f2597 100644 --- a/splatter_wgpu/src/render_pass.rs +++ b/splatter_wgpu/src/render_pass.rs @@ -3,7 +3,7 @@ use crate::{self as wgpu, Color, LoadOp}; /// A builder type to simplify the process of creating a render pass descriptor. #[derive(Debug, Default)] pub struct Builder<'a> { - color_attachments: Vec>, + color_attachments: Vec>>, depth_stencil_attachment: Option>, } @@ -168,7 +168,7 @@ impl<'a> Builder<'a> { { let builder = ColorAttachmentDescriptorBuilder::new(attachment); let descriptor = color_builder(builder).descriptor; - self.color_attachments.push(descriptor); + self.color_attachments.push(Some(descriptor)); self } @@ -196,7 +196,7 @@ impl<'a> Builder<'a> { pub fn into_inner( self, ) -> ( - Vec>, + Vec>>, Option>, ) { let Builder { @@ -211,7 +211,7 @@ impl<'a> Builder<'a> { let (color_attachments, depth_stencil_attachment) = self.into_inner(); let descriptor = wgpu::RenderPassDescriptor { label: Some("nannou_render_pass"), - color_attachments: &color_attachments.into_iter().map(|x| Some(x)).collect(), + color_attachments: &color_attachments, depth_stencil_attachment, }; encoder.begin_render_pass(&descriptor) diff --git a/splatter_wgpu/src/render_pipeline_builder.rs b/splatter_wgpu/src/render_pipeline_builder.rs index 28a9d8dc..6f1e55f0 100644 --- a/splatter_wgpu/src/render_pipeline_builder.rs +++ b/splatter_wgpu/src/render_pipeline_builder.rs @@ -52,7 +52,7 @@ impl<'a> RenderPipelineBuilder<'a> { front_face: Self::DEFAULT_FRONT_FACE, cull_mode: Self::DEFAULT_CULL_MODE, polygon_mode: Self::DEFAULT_POLYGON_MODE, - clamp_depth: Self::DEFAULT_CLAMP_DEPTH, + unclipped_depth: Self::DEFAULT_UNCLIPPED_DEPTH, conservative: false, }; @@ -101,7 +101,7 @@ impl<'a> RenderPipelineBuilder<'a> { slope_scale: Self::DEFAULT_DEPTH_BIAS_SLOPE_SCALE, clamp: Self::DEFAULT_DEPTH_BIAS_CLAMP, }; - pub const DEFAULT_CLAMP_DEPTH: bool = false; + pub const DEFAULT_UNCLIPPED_DEPTH: bool = false; pub const DEFAULT_DEPTH_STENCIL: wgpu::DepthStencilState = wgpu::DepthStencilState { format: Self::DEFAULT_DEPTH_FORMAT, depth_write_enabled: Self::DEFAULT_DEPTH_WRITE_ENABLED,