mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
cb0db07c5b
# Objective Unfortunately, there are three issues with my changes introduced by #7784. 1. The changes left some dead code. This is already taken care of here: #7875. 2. Disabling prepass causes failures because the shadow mapping relies on the `PrepassPlugin` now. 3. Custom materials use the `prepass.wgsl` shader, but this does not always define a fragment entry point. This PR fixes 2. and 3. and resolves #7879. ## Solution - Add a regression test with disabled prepass. - Split `PrepassPlugin` into two plugins: - `PrepassPipelinePlugin` contains the part that is required for the shadow mapping to work and is unconditionally added. - `PrepassPlugin` now only adds the systems and resources required for the "real" prepasses. - Add a noop fragment entry point to `prepass.wgsl`, used if `NORMAL_PASS` is not defined. Co-authored-by: Edgar Geier <geieredgar@gmail.com>
11 lines
340 B
Rust
11 lines
340 B
Rust
//! A test to confirm that `bevy` allows disabling the prepass of the standard material.
|
|
//! This is run in CI to ensure that this doesn't regress again.
|
|
use bevy::{pbr::PbrPlugin, prelude::*};
|
|
|
|
fn main() {
|
|
App::new()
|
|
.add_plugins(DefaultPlugins.set(PbrPlugin {
|
|
prepass_enabled: false,
|
|
}))
|
|
.run();
|
|
}
|