-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problems with pipelined 3d examples #3198
Comments
The |
Thanks for noting these! And for submitting fixes. I have been testing with more advanced scenes which make specific use of these features or demonstrate issues with them and I missed updating the examples that they affect. |
The artifacts in shadow_biases_pipelined are intentional. It’s a bit of a playground to let people get a feel for adjusting the depth and normal biases for shadow maps. The instructions printed to the terminal tell you how you can adjust them. This has confused other people too so we should make the example’s intent clearer. |
yesterday it was looking fine (so I didn't report here) but today I tested again and was surprised)) |
shadows in |
The default values that I found to work quite well are: depth bias 0.02, normal bias 0.6. Hopefully that helps you to see how adjusting the biases behaves. |
#3200 was merged which should fix example |
I confirm that |
Do you still have an issue with |
I'll test |
Absolutely. It’s not a bug though, rather that the shadow resolution is necessarily low with the current solution. I was working on a technique called cascaded shadow maps that will significantly improve the directional light shadow quality, but I thought it would need some more time to get it working well and have instead focused on getting my chain of branches merged so we could get to this point and move closer to a 0.6 release. Improvements will continue to come. :) |
You can also increase (a little) shadow resolution with those two resources: App::new()
.add_plugins(PipelinedDefaultPlugins)
.insert_resource(bevy::pbr2::PointLightShadowMap {
size: 2_usize.pow(13),
})
.insert_resource(bevy::pbr2::DirectionalLightShadowMap {
size: 2_usize.pow(13),
}) And shadows seems to be better for me with a I didn't find any example showing those resources, should we add one? You can add this system to the fn adjust_shadow_map_sizes(
input: Res<Input<KeyCode>>,
mut pointlight: ResMut<PointLightShadowMap>,
mut directionallight: ResMut<DirectionalLightShadowMap>,
) {
if input.just_pressed(KeyCode::Key9) {
pointlight.size /= 2;
directionallight.size /= 2;
println!("Shadow Map Size: {}", pointlight.size);
}
if input.just_pressed(KeyCode::Key0) {
pointlight.size *= 2;
directionallight.size *= 2;
println!("Shadow Map Size: {}", pointlight.size);
}
} |
I think that's cool (tweaking the system with resources) maybe it worth describing in examples. |
And yeah, |
Bevy version
latest (f3d4be3)
Operating system & version
Fedora 35
What you did
Ran new pipelined 3d examples
What happened
Summary: most examples work as intended, but others are 'wrong' or strange (look like something is missing)
Screenshots
pbr_pipelined:
note: regular pbr example works just fine.
shadow_caster_receiver_pipelined:
in this one pressing C or R has no effect on what is being displayed on screen.
texture_pipelined:
transparency doesn't work.
Additional information
hardware: Ryzen 5 3500u, iGPU: Vega 8, 12G Ram.
The text was updated successfully, but these errors were encountered: