bevy/crates/bevy_core_pipeline/src
Marco Buono 292e069bb5
Apply codebase changes in preparation for StandardMaterial transmission (#8704)
# Objective

- Make #8015 easier to review;

## Solution

- This commit contains changes not directly related to transmission
required by #8015, in easier-to-review, one-change-per-commit form.

---

## Changelog

### Fixed

- Clear motion vector prepass using `0.0` instead of `1.0`, to avoid TAA
artifacts on transparent objects against the background;

### Added

- The `E` mathematical constant is now available for use in shaders,
exposed under `bevy_pbr::utils`;
- A new `TAA` shader def is now available, for conditionally enabling
shader logic via `#ifdef` when TAA is enabled; (e.g. for jittering
texture samples)
- A new `FallbackImageZero` resource is introduced, for when a fallback
image filled with zeroes is required;
- A new `RenderPhase<I>::render_range()` method is introduced, for
render phases that need to render their items in multiple parceled out
“steps”;

### Changed

- The `MainTargetTextures` struct now holds both `Texture` and
`TextureViews` for the main textures;
- The fog shader functions under `bevy_pbr::fog` now take the a `Fog`
structure as their first argument, instead of relying on the global
`fog` uniform;
- The main textures can now be used as copy sources;

## Migration Guide

- `ViewTarget::main_texture()` and `ViewTarget::main_texture_other()`
now return `&Texture` instead of `&TextureView`. If you were relying on
these methods, replace your usage with
`ViewTarget::main_texture_view()`and
`ViewTarget::main_texture_other_view()`, respectively;
- `ViewTarget::sampled_main_texture()` now returns `Option<&Texture>`
instead of a `Option<&TextureView>`. If you were relying on this method,
replace your usage with `ViewTarget::sampled_main_texture_view()`;
- The `apply_fog()`, `linear_fog()`, `exponential_fog()`,
`exponential_squared_fog()` and `atmospheric_fog()` functions now take a
configurable `Fog` struct. If you were relying on them, update your
usage by adding the global `fog` uniform as their first argument;
2023-05-30 14:21:53 +00:00
..
blit Webgpu support (#8336) 2023-05-04 22:07:57 +00:00
bloom Apply codebase changes in preparation for StandardMaterial transmission (#8704) 2023-05-30 14:21:53 +00:00
contrast_adaptive_sharpening Webgpu support (#8336) 2023-05-04 22:07:57 +00:00
core_2d Add ViewNode to simplify render node management (#8118) 2023-05-08 19:42:23 +00:00
core_3d Add ViewNode to simplify render node management (#8118) 2023-05-08 19:42:23 +00:00
fullscreen_vertex_shader Built-in skybox (#8275) 2023-04-02 10:57:12 +00:00
fxaa Add ViewNode to simplify render node management (#8118) 2023-05-08 19:42:23 +00:00
prepass Apply codebase changes in preparation for StandardMaterial transmission (#8704) 2023-05-30 14:21:53 +00:00
skybox Webgpu support (#8336) 2023-05-04 22:07:57 +00:00
taa fix missed examples in WebGPU update (#8553) 2023-05-16 20:31:30 +00:00
tonemapping Change default tonemapping method (#8685) 2023-05-29 15:36:21 +00:00
upscaling Apply codebase changes in preparation for StandardMaterial transmission (#8704) 2023-05-30 14:21:53 +00:00
clear_color.rs Make Resource trait opt-in, requiring #[derive(Resource)] V2 (#5577) 2022-08-08 21:36:35 +00:00
lib.rs Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
msaa_writeback.rs Use RenderGraphApp in more places (#8298) 2023-04-05 20:57:56 +00:00