Modules§
- Environment maps and reflection probes.
- experimental
meshlet
Experimental features that are not yet finished. Please report any issues you encounter! - Irradiance volumes, also known as voxel global illumination.
Structs§
- An ambient light, which lights the entire scene equally.
- An atomic version of
MaterialBindGroupId
that can be read from and written to safely from multiple threads. - Controls how cascaded shadow mapping works. Prefer using
CascadeShadowConfigBuilder
to construct an instance. - Builder for
CascadeShadowConfig
. - Configure the depth-slicing strategy for clustered forward rendering
- Default render method used for opaque materials.
- A Directional light.
- A component bundle for
DirectionalLight
entities. - Controls the resolution of
DirectionalLight
shadow maps. - A material that extends a base
Material
with additional shaders and data. - A
SystemSet
that encompasses bothextract_meshes_for_cpu_building
andextract_meshes_for_gpu_building
. - Metadata for fog
- A plugin that consolidates fog extraction, preparation and related resources/assets
- Configures the “classic” computer graphics distance fog effect, in which objects appear progressively more covered in atmospheric haze the further away they are from the camera. Affects meshes rendered via the PBR
StandardMaterial
. - The GPU-side representation of the fog configuration that’s sent as a uniform to the shader
- A plugin that builds mesh uniforms on GPU.
- The render node for the mesh uniform building pass.
- A marker component for a light probe, which is a cuboid region that provides global illumination to all fragments inside it.
- Adds support for light probes: cuboid bounding regions that apply global illumination to objects within them.
- A GPU buffer that stores information about all light probes.
- A per-view shader uniform that specifies all the light probes that the view takes into account.
- A component that applies baked indirect diffuse global illumination from a lightmap.
- A plugin that provides an implementation of lightmaps.
- Render pipeline data for a given
Material
. - A key uniquely identifying a specialized
MaterialPipeline
. - Adds the necessary ECS resources and render logic to enable rendering entities using the given
Material
asset type. - Common
Material
properties, calculated for a specific material instance. - Bind groups for meshes currently loaded.
- Information about each mesh instance needed to cull it on GPU.
- A GPU buffer that holds the information needed to cull meshes on GPU.
- Various flags and tightly-packed values on a mesh.
- Information that has to be transferred from CPU to GPU in order to produce the full
MeshUniform
. - All possible
BindGroupLayout
s in bevy’s default mesh shader (mesh.wgsl
). - MSAA uses the highest 3 bits for the MSAA log2(sample count) to support up to 128x MSAA.
- A key that uniquely identifies a
MeshPipelineViewLayout
. - Provides support for rendering 3D meshes.
- Add this component to make a
Mesh
not cast shadows. - Add this component to make a
Mesh
not receive shadows. - Sets up the entire PBR infrastructure of bevy.
CameraProjection
specific PBR functionality.- A light that emits light in all directions from a central point.
- A component bundle for
PointLight
entities. - Data prepared for a
Material
instance. - Sets up everything required to use the prepass pipeline.
- Sets up the prepasses for a
Material
. - The compute shader bind group for the mesh uniform building pass.
- The pipeline for the GPU mesh preprocessing shader.
- Specifies variants of the mesh preprocessing shader.
- The compute shader pipelines for the mesh uniform building pass.
- Stores data for all lightmaps in the render world.
- CPU data that the render world keeps for each entity, when not using GPU mesh uniform building.
- Various useful flags for [
RenderMeshInstance
]s. - CPU data that the render world needs to keep for each entity that contains a mesh when using GPU mesh uniform building.
- Information that is gathered during the parallel portion of mesh extraction when GPU mesh uniform building is enabled.
- CPU data that the render world needs to keep about each entity that contains a mesh.
- Information that the render world keeps about each entity that contains a mesh, when using CPU mesh instance data building.
- Information that the render world keeps about each entity that contains a mesh, when using GPU mesh instance data building.
- Data that
crate::material::queue_material_meshes
and similar systems need in order to place entities that contain meshes in the right batch. - A component, part of the render world, that stores the mapping from asset ID or IDs to the texture index in the appropriate binding arrays.
- Bundle to apply screen space ambient occlusion.
- Plugin for screen space ambient occlusion.
- Component to apply screen space ambient occlusion to a 3d camera.
- Sets the bind group for a given
Material
at the configuredI
index. - A light that emits light in a given direction from a central point. Behaves like a point light in a perfectly absorbent housing that shines light only in a given direction. The direction is taken from the transform, and can be specified with
Transform::looking_at
. - A component bundle for spot light entities
- A material with “standard” properties used in PBR lighting Standard property values with pictures here https://google.github.io/filament/Material%20Properties.pdf.
- Bitflags info about the material a shader is currently rendering. This is accessible in the shader in the
StandardMaterialUniform
- The pipeline key for
StandardMaterial
, packed into 64 bits. - The GPU representation of the uniform data of a
StandardMaterial
. - Add this component to make a
Mesh
using a PBR material withdiffuse_transmission
> 0.0
receive shadows on its diffuse transmission lobe. (i.e. its “backside”) - Inserted on each
Entity
with anExtractedView
to keep track of its offset in thegpu_fogs
DynamicUniformBuffer
withinFogMeta
- A component attached to each camera in the render world that stores the index of the
LightProbesUniform
in theLightProbesBuffer
.
Enums§
- Configuration of the clustering strategy for clustered forward rendering
- Configure the far z-plane mode used for the furthest depth slice for clustered forward rendering
- Allows switching between different fog falloff modes, and configuring their parameters.
- Render method used for opaque materials.
- The parallax mapping method to use to compute depth based on the material’s
depth_map
. - The per-thread queues used during
extract_meshes_for_gpu_building
. - Information that the render world keeps about each entity that contains a mesh.
- Add this component to a
Camera3d
to control how to anti-alias shadow edges.
Constants§
- Handle for the fog WGSL Shader internal asset
- The ID of the lightmap shader.
- MAX_CASCADES_PER_LIGHTNon-
webgl
or non-WebAssembly orwebgpu
- MAX_DIRECTIONAL_LIGHTSNon-
webgl
or non-WebAssembly orwebgpu
- Maximum number of joints supported for skinned meshes.
- The maximum number of each type of light probe that each view will consider.
- MESH_PIPELINE_VIEW_LAYOUT_SAFE_MAX_TEXTURESDebug-assertions enabledHow many textures are allowed in the view bind group layout (
@group(0)
) before broader compatibility with WebGL and WebGPU is at risk, due to the minimum guaranteed values forMAX_TEXTURE_IMAGE_UNITS
(in WebGL) andmaxSampledTexturesPerShaderStage
(in WebGPU), currently both at 16. - The handle to the
mesh_preprocess.wgsl
compute shader.
Traits§
- A trait implemented by all components that represent light probes.
- Materials are used alongside
MaterialPlugin
andMaterialMeshBundle
to spawn entities that are rendered with a specificMaterial
type. They serve as an easy to use high level way to renderMesh
entities with custom shader logic. - A subset of the
Material
trait for defining extensions to a baseMaterial
, such as the builtinStandardMaterial
. A user type implementing the trait should be used as theE
generic param in anExtendedMaterial
struct.
Functions§
- Extracts meshes from the main world into the render world, populating the
RenderMeshInstances
. - Extracts meshes from the main world into the render world and queues
MeshInputUniform
s to be uploaded to the GPU. - Generates all possible view layouts for the mesh pipeline, based on all combinations of
MeshPipelineViewLayoutKey
flags. - Prepares fog metadata and writes the fog-related uniform buffers to the GPU
- A system that attaches the mesh uniform buffers to the bind groups for the variants of the mesh preprocessing compute shader.
- A system that specializes the
mesh_preprocess.wgsl
pipelines if necessary. - For each view, iterates over all the meshes visible from that view and adds them to
BinnedRenderPhase
s orSortedRenderPhase
s as appropriate. - For each shadow cascade, iterates over all the meshes “visible” from it and adds them to
BinnedRenderPhase
s orSortedRenderPhase
s as appropriate. - Writes the information needed to do GPU mesh culling to the GPU.
Type Aliases§
- A component bundle for PBR entities with a
Mesh
and aStandardMaterial
. - A convenient alias for
Or<(With<PointLight>, With<SpotLight>, With<DirectionalLight>)>
, for use withVisibleEntities
.