Commit f198bd6
authored
increase morph targets to 256 (#21421)
# Objective
our current morph target / blend shape limit is 64 per model, documented
as "to support all hardware". many assets use more than this ("over a
hundred" is common), so i'd like to increase this limit.
the relevant hardware constraint is uniform buffer size (usage in
morph.wgsl). morph targets use 4 bytes per entry, and wgpu's downlevel
uniform buffer size limit is 16k so we have a lot of room from the 256
bytes we are currently limiting to, while still supporting the vast
majority of hardware.
## Solution
increase the limit to 256 targets / 1k.
we also increase the input to the buffer to this 1k size: this was not
done previously but worked as long as the min buffer alignment was 256
(which it probably always is at the moment) as it was sized up to match
alignment previously.
there may be a slight performance impact from using a larger size in all
cases but it should be negligible.1 parent 176d5a3 commit f198bd6
File tree
3 files changed
+7
-3
lines changed- crates
- bevy_mesh/src
- bevy_pbr/src/render
3 files changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| |||
0 commit comments