bevy/crates/bevy_core_pipeline/src
arcashka 6027890a11
move wgsl color operations from bevy_pbr to bevy_render (#13209)
# Objective

`bevy_pbr/utils.wgsl` shader file contains mathematical constants and
color conversion functions. Both of those should be accessible without
enabling `bevy_pbr` feature. For example, tonemapping can be done in non
pbr scenario, and it uses color conversion functions.

Fixes #13207

## Solution

* Move mathematical constants (such as PI, E) from
`bevy_pbr/src/render/utils.wgsl` into `bevy_render/src/maths.wgsl`
* Move color conversion functions from `bevy_pbr/src/render/utils.wgsl`
into new file `bevy_render/src/color_operations.wgsl`

## Testing
Ran multiple examples, checked they are working:
* tonemapping
* color_grading
* 3d_scene
* animated_material
* deferred_rendering
* 3d_shapes
* fog
* irradiance_volumes
* meshlet
* parallax_mapping
* pbr
* reflection_probes
* shadow_biases
* 2d_gizmos
* light_gizmos
---

## Changelog
* Moved mathematical constants (such as PI, E) from
`bevy_pbr/src/render/utils.wgsl` into `bevy_render/src/maths.wgsl`
* Moved color conversion functions from `bevy_pbr/src/render/utils.wgsl`
into new file `bevy_render/src/color_operations.wgsl`

## Migration Guide
In user's shader code replace usage of mathematical constants from
`bevy_pbr::utils` to the usage of the same constants from
`bevy_render::maths`.
2024-05-04 10:30:23 +00:00
..
auto_exposure Implement Auto Exposure plugin (#12792) 2024-05-03 17:45:17 +00:00
blit Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bloom Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
contrast_adaptive_sharpening Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
core_2d Implement GPU frustum culling. (#12889) 2024-04-28 12:50:00 +00:00
core_3d Implement Auto Exposure plugin (#12792) 2024-05-03 17:45:17 +00:00
deferred Implement GPU frustum culling. (#12889) 2024-04-28 12:50:00 +00:00
fullscreen_vertex_shader Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
fxaa Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
motion_blur Per-Object Motion Blur (#9924) 2024-04-25 01:16:02 +00:00
prepass Implement GPU frustum culling. (#12889) 2024-04-28 12:50:00 +00:00
skybox Consolidate Render(Ui)Materials(2d) into RenderAssets (#12827) 2024-04-09 13:26:34 +00:00
taa Per-Object Motion Blur (#9924) 2024-04-25 01:16:02 +00:00
tonemapping move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
upscaling Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
lib.rs Implement Auto Exposure plugin (#12792) 2024-05-03 17:45:17 +00:00
msaa_writeback.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00