Skip to content
Merged
1 change: 1 addition & 0 deletions crates/bevy_core_pipeline/src/core_2d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub mod graph {
MainOpaquePass,
MainTransparentPass,
EndMainPass,
Wireframe,
Bloom,
PostProcessing,
Tonemapping,
Expand Down
1 change: 1 addition & 0 deletions crates/bevy_core_pipeline/src/core_3d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub mod graph {
MainTransmissivePass,
MainTransparentPass,
EndMainPass,
Wireframe,
LateDownsampleDepth,
Taa,
MotionBlur,
Expand Down
12 changes: 6 additions & 6 deletions crates/bevy_pbr/src/render/wireframe.wgsl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#import bevy_pbr::forward_io::VertexOutput

struct WireframeMaterial {
color: vec4<f32>,
};
struct PushConstants {
color: vec4<f32>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI push constants aren't available on WebGPU. Idk how we feel about requiring them for wireframes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wireframes require the POLYGON_MODE_LINE feature which isn't available on web.

}

var<push_constant> push_constants: PushConstants;

@group(2) @binding(0)
var<uniform> material: WireframeMaterial;
@fragment
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
return material.color;
return push_constants.color;
}
Loading