Skip to content

Commit

Permalink
Enable Direct rendering on all backends until the flickering bug is f…
Browse files Browse the repository at this point in the history
…ixed
  • Loading branch information
Pombal committed Sep 27, 2023
1 parent 1e8ccd9 commit 83b6dd1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/settings/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,19 @@ pub enum RenderMode {

impl RenderMode {
pub const fn instrinsic_render_mode() -> Self {
// All backends are now using Direct rendering due to a one frame lag flickering bug with culling in the indirect rendering path.
cfg_if::cfg_if! {
if #[cfg(any(target_os = "windows", target_os = "linux"))] {
Self::MultiIndirect
//Self::MultiIndirect
Self::Direct
} else if #[cfg(target_os = "macos")] {
Self::Indirect
//Self::Indirect
Self::Direct
} else if #[cfg(target_os = "unknown")] {
// Chrome uses DirectX12 which does not correctly implement `INDIRECT_FIRST_INSTANCE` which causes the wrong instance index to be passed to indirect draws.
// This in turn causes a dispatch of X vertices to unconditionally use instance/entity 0, and therefore the wrong mesh for the dispatch count.
// Not good
Self::Direct
Self::Direct
} else {
Self::Direct
}
Expand Down

0 comments on commit 83b6dd1

Please sign in to comment.