@@ -64,21 +64,6 @@ impl SpecializedMeshPipeline for GizmoPipeline3d {
64
64
Mesh :: ATTRIBUTE_POSITION . at_shader_location ( 0 ) ,
65
65
Mesh :: ATTRIBUTE_COLOR . at_shader_location ( 1 ) ,
66
66
] ) ?;
67
- let ( label, blend, depth_write_enabled) ;
68
- if key. contains ( MeshPipelineKey :: BLEND_PREMULTIPLIED_ALPHA ) {
69
- label = "transparent_gizmo_pipeline" . into ( ) ;
70
- blend = Some ( BlendState :: ALPHA_BLENDING ) ;
71
- // For the transparent pass, fragments that are closer will be alpha
72
- // blended but their depth is not written to the depth buffer.
73
- depth_write_enabled = false ;
74
- } else {
75
- label = "opaque_gizmo_pipeline" . into ( ) ;
76
- blend = Some ( BlendState :: REPLACE ) ;
77
- // For the opaque and alpha mask passes, fragments that are closer
78
- // will replace the current fragment value in the output and the depth is
79
- // written to the depth buffer.
80
- depth_write_enabled = true ;
81
- }
82
67
let bind_group_layout = match key. msaa_samples ( ) {
83
68
1 => vec ! [ self . mesh_pipeline. view_layout. clone( ) ] ,
84
69
_ => {
@@ -106,7 +91,7 @@ impl SpecializedMeshPipeline for GizmoPipeline3d {
106
91
entry_point : "fragment" . into ( ) ,
107
92
targets : vec ! [ Some ( ColorTargetState {
108
93
format,
109
- blend,
94
+ blend: Some ( BlendState :: ALPHA_BLENDING ) ,
110
95
write_mask: ColorWrites :: ALL ,
111
96
} ) ] ,
112
97
} ) ,
@@ -122,7 +107,7 @@ impl SpecializedMeshPipeline for GizmoPipeline3d {
122
107
} ,
123
108
depth_stencil : Some ( DepthStencilState {
124
109
format : TextureFormat :: Depth32Float ,
125
- depth_write_enabled,
110
+ depth_write_enabled : false ,
126
111
depth_compare : CompareFunction :: Greater ,
127
112
stencil : StencilState {
128
113
front : StencilFaceState :: IGNORE ,
@@ -142,7 +127,7 @@ impl SpecializedMeshPipeline for GizmoPipeline3d {
142
127
alpha_to_coverage_enabled : false ,
143
128
} ,
144
129
push_constant_ranges : vec ! [ ] ,
145
- label : Some ( label ) ,
130
+ label : Some ( "gizmo_3d_pipeline" . into ( ) ) ,
146
131
} )
147
132
}
148
133
}
0 commit comments