@@ -2,23 +2,27 @@ use crate::alpha::AlphaMode;
22use crate :: opaque:: OpaqueRendererMethod ;
33use crate :: render:: MeshPipeline ;
44use crate :: render:: MeshPipelineKey ;
5- use crate :: render_phase:: { DrawFunctionId , DrawFunctionLabel , InternedDrawFunctionLabel , InternedShaderLabel , ShaderLabel } ;
6- use crate :: render_resource:: { BindGroupLayoutDescriptor , RenderPipelineDescriptor , SpecializedMeshPipelineError } ;
5+ use crate :: render_phase:: {
6+ DrawFunctionId , DrawFunctionLabel , InternedDrawFunctionLabel , InternedShaderLabel , ShaderLabel ,
7+ } ;
8+ use crate :: render_resource:: {
9+ BindGroupLayoutDescriptor , RenderPipelineDescriptor , SpecializedMeshPipelineError ,
10+ } ;
711use crate :: * ;
812use alloc:: sync:: Arc ;
913use bevy_asset:: Handle ;
1014use bevy_ecs:: resource:: Resource ;
1115use bevy_mesh:: MeshVertexBufferLayoutRef ;
1216use bevy_platform:: hash:: FixedHasher ;
1317use bevy_shader:: Shader ;
14- use smallvec:: SmallVec ;
1518use core:: any:: { Any , TypeId } ;
16- use core:: hash:: { BuildHasher , Hasher } ;
1719use core:: hash:: Hash ;
20+ use core:: hash:: { BuildHasher , Hasher } ;
21+ use smallvec:: SmallVec ;
1822
1923pub const MATERIAL_BIND_GROUP_INDEX : usize = 3 ;
2024
21- /// Render pipeline data for a given [`Material`] .
25+ /// Render pipeline data for a given material .
2226#[ derive( Resource , Clone ) ]
2327pub struct MaterialPipeline {
2428 pub mesh_pipeline : MeshPipeline ,
@@ -110,7 +114,7 @@ impl Default for ErasedMaterialKey {
110114 }
111115}
112116
113- /// Common [`Material`] properties, calculated for a specific material instance.
117+ /// Common material properties, calculated for a specific material instance.
114118#[ derive( Default ) ]
115119pub struct MaterialProperties {
116120 /// Is this material should be rendered by the deferred renderer when.
@@ -120,17 +124,16 @@ pub struct MaterialProperties {
120124 pub alpha_mode : AlphaMode ,
121125 /// The bits in the [`MeshPipelineKey`] for this material.
122126 ///
123- /// These are precalculated so that we can just "or" them together in
124- /// [`queue_material_meshes`].
127+ /// These are precalculated so that we can just "or" them together.
125128 pub mesh_pipeline_key_bits : MeshPipelineKey ,
126129 /// Add a bias to the view depth of the mesh which can be used to force a specific render order
127130 /// for meshes with equal depth, to avoid z-fighting.
128131 /// The bias is in depth-texture units so large values may be needed to overcome small depth differences.
129132 pub depth_bias : f32 ,
130- /// Whether the material would like to read from [`ViewTransmissionTexture`](bevy_core_pipeline::core_3d::ViewTransmissionTexture).
133+ /// Whether the material would like to read from a view transmission texture
131134 ///
132- /// This allows taking color output from the [`Opaque3d`] pass as an input, (for screen-space transmission) but requires
133- /// rendering to take place in a separate [`Transmissive3d`] pass.
135+ /// This allows taking color output from the opaque 3d pass as an input, (for screen-space transmission) but requires
136+ /// rendering to take place in a separate transmissive 3d pass.
134137 pub reads_view_transmission_texture : bool ,
135138 pub render_phase_type : RenderPhaseType ,
136139 pub material_layout : Option < BindGroupLayoutDescriptor > ,
@@ -197,4 +200,3 @@ pub enum RenderPhaseType {
197200 Transmissive ,
198201 Transparent ,
199202}
200-
0 commit comments