feat: nonfunctional improvements
This commit is contained in:
@@ -15,12 +15,12 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
struct MyExtendedMaterial {
|
||||
quantize_steps: u32,
|
||||
struct LineMaterial {
|
||||
unused: u32,
|
||||
}
|
||||
|
||||
@group(2) @binding(100)
|
||||
var<uniform> my_extended_material: MyExtendedMaterial;
|
||||
var<uniform> line_mat: LineMaterial;
|
||||
|
||||
@fragment
|
||||
fn fragment(
|
||||
@@ -43,7 +43,7 @@ fn fragment(
|
||||
#endif
|
||||
|
||||
// alpha discard
|
||||
pbr_input.material.base_color = alpha_discard(pbr_input.material, pbr_input.material.base_color);
|
||||
// pbr_input.material.base_color = alpha_discard(pbr_input.material, pbr_input.material.base_color);
|
||||
|
||||
#ifdef PREPASS_PIPELINE
|
||||
// in deferred mode we can't modify anything after that, as lighting is run in a separate fullscreen shader.
|
||||
|
||||
@@ -44,6 +44,10 @@ impl MaterialExtension for LineExtension {
|
||||
LINE_SHADER_HANDLE.into()
|
||||
}
|
||||
|
||||
fn deferred_fragment_shader() -> ShaderRef {
|
||||
LINE_SHADER_HANDLE.into()
|
||||
}
|
||||
|
||||
fn alpha_mode() -> Option<AlphaMode> {
|
||||
Some(AlphaMode::Opaque)
|
||||
}
|
||||
@@ -112,6 +116,8 @@ fn build_line_mesh(
|
||||
match lines.entity.get() {
|
||||
Some(e) => cmds.entity(**e),
|
||||
None => {
|
||||
// if we couldn't get the lines entity then we need to gen the mesh later
|
||||
lines.gen_mesh.store(true, Ordering::Relaxed);
|
||||
let e = cmds.spawn((
|
||||
Name::new("LinesNode"),
|
||||
SpatialNode(Arc::downgrade(&lines.spatial)),
|
||||
@@ -237,9 +243,9 @@ fn build_line_mesh(
|
||||
panic!("vertex positions contains non finite pos: {vertex_positions:#?}",);
|
||||
}
|
||||
mesh.insert_indices(Indices::U32(vertex_indices));
|
||||
mesh.insert_attribute(Mesh::ATTRIBUTE_COLOR, vertex_colors);
|
||||
mesh.insert_attribute(Mesh::ATTRIBUTE_NORMAL, vertex_normals);
|
||||
mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, vertex_positions.clone());
|
||||
mesh.insert_attribute(Mesh::ATTRIBUTE_NORMAL, vertex_normals);
|
||||
mesh.insert_attribute(Mesh::ATTRIBUTE_COLOR, vertex_colors);
|
||||
|
||||
let mut entity = match lines.entity.get() {
|
||||
Some(e) => cmds.entity(**e),
|
||||
|
||||
Reference in New Issue
Block a user