Skip to content

Commit 81c5261

Browse files
committed
doc + notes
1 parent 2a6d71e commit 81c5261

File tree

7 files changed

+48
-14
lines changed

7 files changed

+48
-14
lines changed

crates/bevy_core_pipeline/src/core_3d/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -846,12 +846,10 @@ pub fn prepare_core_3d_depth_textures(
846846
}
847847
}
848848

849-
/// A material can specify [`MaterialProperties:reads_view_transmission_texture`] to read from [`ViewTransmissionTexture`].
849+
/// A material can specify [`MaterialProperties::reads_view_transmission_texture`](`bevy_material::material::MaterialProperties`) to read from [`ViewTransmissionTexture`].
850850
///
851851
/// This allows taking color output from the [`Opaque3d`] pass as an input, (for screen-space transmission) but requires
852852
/// rendering to take place in a separate [`Transmissive3d`] pass.
853-
///
854-
/// [MaterialProperties]: bevy_material::material::MaterialProperties
855853
#[derive(Component)]
856854
pub struct ViewTransmissionTexture {
857855
pub texture: Texture,

crates/bevy_material/src/render/mesh_bindings.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,15 @@ pub struct MeshLayouts {
1616
/// frame's joint matrices, so that we can compute motion vectors.
1717
pub skinned_motion: BindGroupLayoutDescriptor,
1818

19-
/// Also includes the uniform and [`MorphAttributes`] for morph targets.
20-
///
21-
/// [`MorphAttributes`]: bevy_mesh::morph::MorphAttributes
19+
/// Also includes the uniform and [`MorphAttributes`](`bevy_mesh::morph::MorphAttributes`) for morph targets.
2220
pub morphed: BindGroupLayoutDescriptor,
2321

2422
/// Like [`MeshLayouts::morphed`], but includes a slot for the previous
2523
/// frame's morph weights, so that we can compute motion vectors.
2624
pub morphed_motion: BindGroupLayoutDescriptor,
2725

2826
/// Also includes both uniforms for skinning and morph targets, also the
29-
/// morph target [`MorphAttributes`] binding.
30-
///
31-
/// [`MorphAttributes`]: bevy_mesh::morph::MorphAttributes
27+
/// morph target [`MorphAttributes`](`bevy_mesh::morph::MorphAttributes`) binding.
3228
pub morphed_skinned: BindGroupLayoutDescriptor,
3329

3430
/// Like [`MeshLayouts::morphed_skinned`], but includes slots for the

crates/bevy_pbr/src/material.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub use bevy_material::material::*;
7272
/// Materials must implement [`AsBindGroup`] to define how data will be transferred to the GPU and bound in shaders.
7373
/// [`AsBindGroup`] can be derived, which makes generating bindings straightforward. See the [`AsBindGroup`] docs for details.
7474
///
75-
/// Doc refs [MaterialPipeline], [`MaterialProperties`]
75+
/// Doc refs [`MaterialPipeline`], [`MaterialProperties`]
7676
///
7777
/// # Example
7878
///

crates/bevy_pbr/src/render/mesh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ impl RenderMeshInstanceGpuBuilder {
618618
/// Flushes this mesh instance to the [`RenderMeshInstanceGpu`] and
619619
/// [`MeshInputUniform`] tables, replacing the existing entry if applicable.
620620
///
621-
/// Provides the mesh instance id for [`RenderMeshInstanceShared:for_gpu_building`]
621+
/// Provides the mesh instance id for [`RenderMeshInstanceShared::for_gpu_building`]
622622
fn update(
623623
mut self,
624624
entity: MainEntity,

crates/bevy_render/src/mesh/render.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub struct MeshUniform {
5353
/// The index of this mesh's first vertex in the vertex buffer.
5454
///
5555
/// Multiple meshes can be packed into a single vertex buffer (see
56-
/// [`MeshAllocator`](`mesh::allocator::MeshAllocator`) ). This value stores the offset of the first vertex in
56+
/// [`MeshAllocator`](`crate::mesh::allocator::MeshAllocator`) ). This value stores the offset of the first vertex in
5757
/// this mesh in that buffer.
5858
pub first_vertex_index: u32,
5959
/// The current skin index, or `u32::MAX` if there's no skin.
@@ -100,13 +100,13 @@ pub struct MeshInputUniform {
100100
/// The index of this mesh's first vertex in the vertex buffer.
101101
///
102102
/// Multiple meshes can be packed into a single vertex buffer (see
103-
/// [`MeshAllocator`](`mesh::allocator::MeshAllocator`) ). This value stores the offset of the first vertex in
103+
/// [`MeshAllocator`](`crate::mesh::allocator::MeshAllocator`) ). This value stores the offset of the first vertex in
104104
/// this mesh in that buffer.
105105
pub first_vertex_index: u32,
106106
/// The index of this mesh's first index in the index buffer, if any.
107107
///
108108
/// Multiple meshes can be packed into a single index buffer (see
109-
/// [`MeshAllocator`](`mesh::allocator::MeshAllocator`) ). This value stores the offset of the first index in
109+
/// [`MeshAllocator`](`crate::mesh::allocator::MeshAllocator`) ). This value stores the offset of the first index in
110110
/// this mesh in that buffer.
111111
///
112112
/// If this mesh isn't indexed, this value is ignored.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: "`bevy_material`"
3+
pull_requests: [21543]
4+
---
5+
6+
TODO: This is just a commit log, need to clean up
7+
8+
The following have moved:
9+
- initial bevy_material
10+
- Opaque move
11+
- Move ShaderLabel, DrawFunctionLabel, wgpu exports from render_resource, bind_group_layout_entries
12+
- Move DrawFunctionId
13+
- Move SpecializedMeshPipelineError
14+
- Move BindGroupLayoutDescriptor, RenderPipelineDescriptor, NoFragmentStateError, VertexState, FragmentState, ComputePipelineDescriptor
15+
- Move MESH_PIPELINE_VIEW_LAYOUT_SAFE_MAX_TEXTURES, MeshPipelineKey
16+
- Move MATERIAL_BIND_GROUP_INDEX, ErasedMaterialPipelineKey, ErasedMaterialKey, ErasedMaterialKeyVTable, RenderPhaseType
17+
- Convert MeshPipelineViewLayouts and MeshPipeline to RenderStartup system
18+
- mesh_pipeline_view_layout_key_from_msaa and mesh_pipeline_view_layout_key_from_view_prepass_textures
19+
- Move MeshPipelineViewLayout, MeshPipelineViewLayoutKey, MeshPipelineViewLayouts
20+
- Make impl MeshLayouts a trait
21+
- Move MeshLayouts
22+
- Deprecate get_image_texture for MeshPipeline and Mesh2dPipeline, change dummy to Image in MeshPipeline
23+
- Move most of lightmap to bevy_render
24+
- Move MaterialBindingId, MaterialBindGroupIndex, MaterialBindGroupSlot to bevy_render
25+
- Move MeshTransforms, MeshUniform, MeshInputUniform, MeshFlags, RenderMeshInstanceFlags, RenderMeshInstanceCpu, RenderMeshInstanceGpu, PreviousGlobalTransform, RenderMeshInstanceShared, remove_mesh_input_uniform to bevy_render
26+
- Move MAX_JOINTS, MAX_TOTAL_JOINTS, JOINTS_PER_ALLOCATION_UNIT, JOINT_EXTRACTION_THRESHOLD_FACTOR, SkinByteOffset, SkinUniforms, SkinUniformInfo to bevy_render
27+
- Move util consts
28+
- Move RenderMeshInstances, RenderMeshInstancesCpu, RenderMeshInstancesGpu, RenderMeshQueueData to bevy_render
29+
- Move MeshPipeline to bevy_material, and its render impls to bevy_render
30+
- Move MaterialProperties and MaterialPipeline to bevy_material
31+
- Insert DummyImage resource
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "`bevy_material`"
3+
authors: ["@Zeophlite", "@atlv24"]
4+
pull_requests: [21543]
5+
---
6+
7+
TODO: this needs further work
8+
9+
Materials can now be defined without a renderer

0 commit comments

Comments
 (0)