mirror of
https://github.com/bevyengine/bevy
synced 2024-11-24 21:53:07 +00:00
Fix TAA on camera with viewport (#14582)
# Objective Closes #14526 ## Solution The history texture was being created incorrectly with the viewport size rather than target size. When viewport < target, this meant that the render attachments would differer in size which causes a wgpu validation error. ## Testing Example in linked issue works.
This commit is contained in:
parent
a0cc636ea3
commit
994312ac6d
1 changed files with 3 additions and 3 deletions
|
@ -410,13 +410,13 @@ fn prepare_taa_history_textures(
|
|||
views: Query<(Entity, &ExtractedCamera, &ExtractedView), With<TemporalAntiAliasSettings>>,
|
||||
) {
|
||||
for (entity, camera, view) in &views {
|
||||
if let Some(physical_viewport_size) = camera.physical_viewport_size {
|
||||
if let Some(physical_target_size) = camera.physical_target_size {
|
||||
let mut texture_descriptor = TextureDescriptor {
|
||||
label: None,
|
||||
size: Extent3d {
|
||||
depth_or_array_layers: 1,
|
||||
width: physical_viewport_size.x,
|
||||
height: physical_viewport_size.y,
|
||||
width: physical_target_size.x,
|
||||
height: physical_target_size.y,
|
||||
},
|
||||
mip_level_count: 1,
|
||||
sample_count: 1,
|
||||
|
|
Loading…
Reference in a new issue