Skip to content

Commit f19aa8d

Browse files
authored
Add migration guide for view transformation deprecation (#20338)
# Objective - add migration guide for #20313
1 parent 50dc772 commit f19aa8d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: view_transformations.wgsl deprecated in favor of view.wgsl
3+
pull_requests: [20313]
4+
---
5+
6+
All functions in view_transformations.wgsl have been replaced and deprecated.
7+
8+
To migrate, a straight-forward copy-paste inlining of the deprecated function's new body suffices, as they all now call the new api internally.
9+
10+
For example, if you had before:
11+
12+
```wgsl
13+
#import bevy_pbr::view_transformations
14+
15+
let world_pos = view_transformations::position_view_to_world(view_pos);
16+
```
17+
18+
Now it would be:
19+
20+
```wgsl
21+
#import bevy_render::view
22+
23+
let world_pos = view::position_view_to_world(view_pos, view_bindings::view.world_from_view);
24+
```
25+
26+
This was done to make it possible to pass in custom view bindings, and allow code reuse.
27+
28+
`view_transformations.wgsl` will be deleted in 0.18.

0 commit comments

Comments
 (0)