/// Use the given image as a read-only color attachment in a renderpass
Use the given image as a read-only color attachment in a renderpass
Use the given image as a read - only color attachment in a renderpass
pub fn read_color_attachment(
        &mut self,
        node: RenderGraphNodeId,
        image: RenderGraphImageUsageId,
        color_attachment_index: usize,
        mut constraint: RenderGraphImageConstraint,
        view_options: RenderGraphImageViewOptions,
    ) {
        constraint.resource_type |= RafxResourceType::RENDER_TARGET_COLOR;
        // Add the read to the graph
        let read_image = self.add_image_read(node, image, constraint, view_options);
        self.set_color_attachment(
            node,
            color_attachment_index,
            RenderGraphPassColorAttachmentInfo {
                attachment_type: RenderGraphPassAttachmentType::Read,
                clear_color_value: None,
                read_image: Some(read_image),
                write_image: None,
            },
        );
    }
pub fn read_color_attachment ( & mut self , node : RenderGraphNodeId , image : RenderGraphImageUsageId , color_attachment_index : usize , mut constraint : RenderGraphImageConstraint , view_options : RenderGraphImageViewOptions , ) { constraint . resource_type |= RafxResourceType :: RENDER_TARGET_COLOR ; // Add the read to the graph let read_image = self . add_image_read ( node , image , constraint , view_options ) ; self . set_color_attachment ( node , color_attachment_index , RenderGraphPassColorAttachmentInfo { attachment_type : RenderGraphPassAttachmentType :: Read , clear_color_value : None , read_image : Some ( read_image ) , write_image : None , } , ) ; }
Use the given image as a read-only color attachment in a renderpass
Use the given image as a read - only color attachment in a renderpass
&mut self
node
RenderGraphNodeId
image
RenderGraphImageUsageId
color_attachment_index
usize
constraint
RenderGraphImageConstraint
view_options
RenderGraphImageViewOptions