Skip to content

Commit

Permalink
Enable depth write in forward pass when not using prepass (#429)
Browse files Browse the repository at this point in the history
* enable depth write when not using prepass

* add to changelog
  • Loading branch information
IsseW authored Sep 2, 2022
1 parent 6c72498 commit 1fc492e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Per Keep a Changelog there are 6 main categories of changes:
- Fixes loading of gltf with embedded base64 binary data.
- Fixed building with `profiling/profile-with-tracing`. @SparkyPotato
- Fixed panic when a mesh object with a skeleton was despawned. @setzer22
- Fixed forward pass not writing to depth when no depth prepass was used. @IsseW

## v0.3.0

Expand Down
2 changes: 1 addition & 1 deletion rend3-routine/src/forward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ fn build_forward_pipeline_inner(
},
depth_stencil: Some(DepthStencilState {
format: TextureFormat::Depth32Float,
depth_write_enabled: blend.is_none() && use_prepass,
depth_write_enabled: blend.is_none() && !use_prepass,
depth_compare: match use_prepass {
true => CompareFunction::Equal,
false => CompareFunction::GreaterEqual,
Expand Down

0 comments on commit 1fc492e

Please sign in to comment.