Fix depth pass when baking is enabled
@@ -120,7 +120,9 @@ fn build_forward_pass_inner(
polygon_mode: PolygonMode::Fill,
conservative: false,
},
- depth_stencil: Some(DepthStencilState {
+ depth_stencil: match args.baking {
+ Baking::Enabled => None,
+ Baking::Disabled => Some(DepthStencilState {
format: TextureFormat::Depth32Float,
depth_write_enabled: true,
depth_compare: match args.transparency {
@@ -130,6 +132,7 @@ fn build_forward_pass_inner(
stencil: StencilState::default(),
bias: DepthBiasState::default(),
}),
+ },
multisample: MultisampleState {
count: args.samples as u32,
..Default::default()
