/// Create a new image and use it as a writable depth/stencil attachment in a renderpass
Create a new image and use it as a writable depth/stencil attachment in a renderpass
Create a new image and use it as a writable depth / stencil attachment in a renderpass
pub fn create_depth_stencil_attachment(
        &mut self,
        node: RenderGraphNodeId,
        clear_depth_stencil_value: Option<RafxDepthStencilClearValue>,
        mut constraint: RenderGraphImageConstraint,
        view_options: RenderGraphImageViewOptions,
        has_depth: bool,
        has_stencil: bool,
    ) -> RenderGraphImageUsageId {
        constraint.resource_type |= RafxResourceType::RENDER_TARGET_DEPTH_STENCIL;
        // Add the read to the graph
        let create_image = self.add_image_create(node, constraint, view_options);
        self.set_depth_attachment(
            node,
            RenderGraphPassDepthAttachmentInfo {
                attachment_type: RenderGraphPassAttachmentType::Create,
                clear_depth_stencil_value,
                read_image: None,
                write_image: Some(create_image),
                has_depth,
                has_stencil,
            },
        );
        create_image
    }
pub fn create_depth_stencil_attachment ( & mut self , node : RenderGraphNodeId , clear_depth_stencil_value : Option < RafxDepthStencilClearValue > , mut constraint : RenderGraphImageConstraint , view_options : RenderGraphImageViewOptions , has_depth : bool , has_stencil : bool , ) -> RenderGraphImageUsageId { constraint . resource_type |= RafxResourceType :: RENDER_TARGET_DEPTH_STENCIL ; // Add the read to the graph let create_image = self . add_image_create ( node , constraint , view_options ) ; self . set_depth_attachment ( node , RenderGraphPassDepthAttachmentInfo { attachment_type : RenderGraphPassAttachmentType :: Create , clear_depth_stencil_value , read_image : None , write_image : Some ( create_image ) , has_depth , has_stencil , } , ) ; create_image }
Create a new image and use it as a writable depth/stencil attachment in a renderpass
Create a new image and use it as a writable depth / stencil attachment in a renderpass
&mut self
node
RenderGraphNodeId
clear_depth_stencil_value
Option<RafxDepthStencilClearValue>
constraint
RenderGraphImageConstraint
view_options
RenderGraphImageViewOptions
has_depth
bool
has_stencil
bool