bevy/crates/bevy_pbr/src/render
Ricky Taylor 9b9d3d81cb
Normalise matrix naming (#13489)
# Objective
- Fixes #10909
- Fixes #8492

## Solution
- Name all matrices `x_from_y`, for example `world_from_view`.

## Testing
- I've tested most of the 3D examples. The `lighting` example
particularly should hit a lot of the changes and appears to run fine.

---

## Changelog
- Renamed matrices across the engine to follow a `y_from_x` naming,
making the space conversion more obvious.

## Migration Guide
- `Frustum`'s `from_view_projection`, `from_view_projection_custom_far`
and `from_view_projection_no_far` were renamed to
`from_clip_from_world`, `from_clip_from_world_custom_far` and
`from_clip_from_world_no_far`.
- `ComputedCameraValues::projection_matrix` was renamed to
`clip_from_view`.
- `CameraProjection::get_projection_matrix` was renamed to
`get_clip_from_view` (this affects implementations on `Projection`,
`PerspectiveProjection` and `OrthographicProjection`).
- `ViewRangefinder3d::from_view_matrix` was renamed to
`from_world_from_view`.
- `PreviousViewData`'s members were renamed to `view_from_world` and
`clip_from_world`.
- `ExtractedView`'s `projection`, `transform` and `view_projection` were
renamed to `clip_from_view`, `world_from_view` and `clip_from_world`.
- `ViewUniform`'s `view_proj`, `unjittered_view_proj`,
`inverse_view_proj`, `view`, `inverse_view`, `projection` and
`inverse_projection` were renamed to `clip_from_world`,
`unjittered_clip_from_world`, `world_from_clip`, `world_from_view`,
`view_from_world`, `clip_from_view` and `view_from_clip`.
- `GpuDirectionalCascade::view_projection` was renamed to
`clip_from_world`.
- `MeshTransforms`' `transform` and `previous_transform` were renamed to
`world_from_local` and `previous_world_from_local`.
- `MeshUniform`'s `transform`, `previous_transform`,
`inverse_transpose_model_a` and `inverse_transpose_model_b` were renamed
to `world_from_local`, `previous_world_from_local`,
`local_from_world_transpose_a` and `local_from_world_transpose_b` (the
`Mesh` type in WGSL mirrors this, however `transform` and
`previous_transform` were named `model` and `previous_model`).
- `Mesh2dTransforms::transform` was renamed to `world_from_local`.
- `Mesh2dUniform`'s `transform`, `inverse_transpose_model_a` and
`inverse_transpose_model_b` were renamed to `world_from_local`,
`local_from_world_transpose_a` and `local_from_world_transpose_b` (the
`Mesh2d` type in WGSL mirrors this).
- In WGSL, in `bevy_pbr::mesh_functions`, `get_model_matrix` and
`get_previous_model_matrix` were renamed to `get_world_from_local` and
`get_previous_world_from_local`.
- In WGSL, `bevy_sprite::mesh2d_functions::get_model_matrix` was renamed
to `get_world_from_local`.
2024-06-03 16:56:53 +00:00
..
clustered_forward.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
fog.rs Add color conversions #13224 (#13276) 2024-05-09 18:01:52 +00:00
fog.wgsl update shader imports (#10180) 2023-10-21 11:51:58 +00:00
forward_io.wgsl Add UV channel selection to StandardMaterial (#13200) 2024-05-13 18:23:09 +00:00
gpu_preprocess.rs Implement GPU frustum culling. (#12889) 2024-04-28 12:50:00 +00:00
light.rs Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
mesh.rs Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
mesh.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
mesh_bindings.rs Implement motion vectors and TAA for skinned meshes and meshes with morph targets. (#13572) 2024-05-31 17:02:28 +00:00
mesh_bindings.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
mesh_functions.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
mesh_preprocess.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
mesh_types.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
mesh_view_bindings.rs Implement opt-in sharp screen-space reflections for the deferred renderer, with improved raymarching code. (#13418) 2024-05-27 13:43:40 +00:00
mesh_view_bindings.wgsl add tonemapping LUT bindings for sprite and mesh2d pipelines (#13262) 2024-05-28 12:09:26 +00:00
mesh_view_types.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
mod.rs Implement motion vectors and TAA for skinned meshes and meshes with morph targets. (#13572) 2024-05-31 17:02:28 +00:00
morph.rs Implement motion vectors and TAA for skinned meshes and meshes with morph targets. (#13572) 2024-05-31 17:02:28 +00:00
morph.wgsl Implement motion vectors and TAA for skinned meshes and meshes with morph targets. (#13572) 2024-05-31 17:02:28 +00:00
parallax_mapping.wgsl update shader imports (#10180) 2023-10-21 11:51:58 +00:00
pbr.wgsl Implement visibility ranges, also known as hierarchical levels of detail (HLODs). (#12916) 2024-05-03 00:11:35 +00:00
pbr_ambient.wgsl Use “specular occlusion” term to consistently extinguish fresnel on Ambient and Environment Map lights (#10182) 2023-10-23 03:26:20 +00:00
pbr_bindings.wgsl Implement clearcoat per the Filament and the KHR_materials_clearcoat specifications. (#13031) 2024-05-05 22:57:05 +00:00
pbr_fragment.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
pbr_functions.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
pbr_lighting.wgsl Implement opt-in sharp screen-space reflections for the deferred renderer, with improved raymarching code. (#13418) 2024-05-27 13:43:40 +00:00
pbr_prepass.wgsl Apply uv transform in the prepass (#13250) 2024-05-13 22:33:09 +00:00
pbr_prepass_functions.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
pbr_transmission.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
pbr_types.wgsl Implement opt-in sharp screen-space reflections for the deferred renderer, with improved raymarching code. (#13418) 2024-05-27 13:43:40 +00:00
rgb9e5.wgsl Deferred Renderer (#9258) 2023-10-12 22:10:38 +00:00
shadow_sampling.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
shadows.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
skin.rs Implement motion vectors and TAA for skinned meshes and meshes with morph targets. (#13572) 2024-05-31 17:02:28 +00:00
skinning.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
utils.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
view_transformations.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
wireframe.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00