Module bevy::render::render_resource
Modules
Structs
Bind groups are responsible for binding render resources (e.g. buffers, textures, samplers)
to a
TrackedRenderPass
.
This makes them accessible in the pipeline (shaders) as uniforms.Describes a group of bindings and the resources to be bound.
An element of a
BindGroupDescriptor
, consisting of a bindable resource
and the slot to bind it to.A
BindGroup
identifier.Describes a [
BindGroupLayout
].Describes a single binding inside a bind group.
Describes a blend component of a
BlendState
.Describe the blend state of a render pipeline,
within
ColorTargetState
.Describes the segment of a buffer to bind.
Describes a Buffer when allocating.
Different ways that you can use a buffer.
A structure for storing raw bytes that have already been properly formatted
for use by the GPU.
Index of a cached compute pipeline in a
PipelineCache
.Index of a cached render pipeline in a
PipelineCache
.Describes the color state of a render pipeline.
Color write mask. Disabled color channels will not be written to.
Encodes a series of GPU operations.
In-progress recording of a compute pass.
Describes the attachments of a compute pass.
A
ComputePipeline
represents a compute pipeline and its single shader stage.Describes a compute pipeline.
A
ComputePipeline
identifier.Describes the biasing setting for the depth target.
Describes the depth/stencil state in a render pipeline.
Stores data to be transferred to the GPU and made accessible to shaders as a dynamic storage buffer.
Stores data to be transferred to the GPU and made accessible to shaders as a dynamic uniform buffer.
Extent of a texture related operation.
Describes the fragment process in a render pipeline.
View of a buffer which can be used to copy to/from a texture.
View of a texture which can be used to copy to/from a buffer/texture.
Layout of a texture in a buffer’s memory.
Subresource range within an image
Describes the multi-sampling state of a render pipeline.
Pair of load and store operations for an attachment aspect.
Origin of a copy to/from a texture.
Cache for render and compute pipelines.
Handle to a pipeline layout.
Describes a
PipelineLayout
.A prepared bind group returned as a result of
AsBindGroup::as_bind_group
.Describes the state of primitive assembly and rasterization in a render pipeline.
Describes a compute pipeline.
Describes the fragment processing in a render pipeline.
Describes a render (graphics) pipeline.
Describes how the vertex buffer is interpreted.
Describes the vertex processing in a render pipeline.
Describes a color attachment to a [
RenderPass
].Describes a depth/stencil attachment to a [
RenderPass
].Describes the attachments of a render pass.
A
RenderPipeline
represents a graphics pipeline and its stages (shaders), bindings and vertex buffers.Describes a render (graphics) pipeline.
A
RenderPipeline
identifier.A Sampler defines how a pipeline will sample from a
TextureView
.
They define image filters (including anisotropy) and address (wrapping) modes, among other things.Describes a [
Sampler
].A shader, as defined by its
ShaderSource
and ShaderStage
This is an “unprocessed” shader. It can contain preprocessor directives.Handle to a compiled shader module.
Descriptor for use with [
Device::create_shader_module
].Describes the shader stages that a binding will be visible from.
Describes stencil state in a render pipeline.
State of the stencil operation (fixed-pipeline stage).
Stores data to be transferred to the GPU and made accessible to shaders as a storage buffer.
A GPU-accessible texture.
Different ways that you can use a texture.
Describes a [
TextureView
].A
TextureView
identifier.Stores data to be transferred to the GPU and made accessible to shaders as a uniform buffer.
Vertex inputs (attributes) to shaders.
Describes how the vertex buffer is interpreted.
Information about an adapter.
Features that are not guaranteed to be supported.
Represents the sets of limits an adapter/device supports.
Enums
How edges should be handled in texture addressing.
An error that occurs during
AsBindGroup::as_bind_group
calls.Resource that can be bound to a pipeline.
Specific type of a binding.
Alpha blend factor.
Alpha blend operation.
Specific type of a buffer binding.
State of a cached pipeline inserted into a
PipelineCache
.Comparison function used for depth and stencil operations.
Face of a vertex.
Texel mixing mode when sampling between texels.
Vertex winding order which classifies the “front” face of a triangle.
Format of indices used with pipeline.
Operation to perform to the output attachment at the start of a renderpass.
Type of buffer mapping.
An owned binding resource of any type (ex: a
Buffer
, TextureView
, etc).
This is used by types like PreparedBindGroup
to hold a single list of all
render resources used by bindings.A pipeline defining the data layout and shader logic for a specific GPU task.
Type of error returned by a
PipelineCache
when the creation of a GPU pipeline object failed.A descriptor for a
Pipeline
.Type of drawing mode for polygons
Primitive type the input mesh is composed of.
A processed Shader. This cannot contain preprocessor directions. It must be “ready to compile”
Specific type of a sampler binding.
A reference to a shader asset.
Source of a shader module.
Stage of the programmable pipeline.
Operation to perform on the stencil value.
Specific type of a sample in a texture binding.
Kind of data the texture holds.
Dimensionality of a texture.
Underlying texture data format.
Specific type of a sample in a texture binding.
Dimensions of a particular texture view.
This type combines wgpu’s
TextureView
and
SurfaceTexture
into the same interface.Vertex Format for a
VertexAttribute
(input).Whether a vertex buffer is indexed by vertex or by instance.
Statics
Traits
Converts a value to a
BindGroup
with a given BindGroupLayout
, which can then be used in Bevy shaders.
This trait can be derived (and generally should be). Read on for details and examples.Converts a value to a
ShaderType
for use in a bind group.
This is automatically implemented for references that implement Into
.
Generally normal Into
/ From
impls should be preferred, but
sometimes additional runtime metadata is required.
This exists largely to make some AsBindGroup
use cases easier.Trait implemented for all WGSL fixed-footprint types
Base trait for all WGSL host-shareable types
Type Definitions
Integral type used for buffer offsets.
Describes a [
Buffer
].Integral type used for buffer slice sizes.
Describes a
CommandEncoder
.View of a buffer which can be used to copy to/from a texture.
View of a texture which can be used to copy to/from a buffer/texture.
Describes a [
Texture
].