Commit 3639a48
committed
Use Vector4 storage for tangents in SurfaceTool for consistency
The interface SurfaceTool presents for tangents and all its usages work
with tangent frames represented as 4 values: tangent direction and
scalar orientation (+1 or -1).
However, internally it was represented as tangent+bitangent (mistakenly
called binormal), which introduces additional conversions back & forth
and is problematic for replacing the tangent space generation algorithm.
This change converts the internal storage and adjusts the calling code
accordingly. Note that since SurfaceTool::set_tangent is exposed to
scripts, I've kept the Plane interface there even though it's misleading
to use this type here.1 parent 3170b87 commit 3639a48
4 files changed
Lines changed: 15 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1482 | 1482 | | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
| 1485 | + | |
1489 | 1486 | | |
1490 | 1487 | | |
1491 | 1488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2235 | 2235 | | |
2236 | 2236 | | |
2237 | 2237 | | |
2238 | | - | |
2239 | | - | |
2240 | | - | |
2241 | | - | |
| 2238 | + | |
2242 | 2239 | | |
2243 | 2240 | | |
2244 | 2241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 99 | | |
104 | 100 | | |
105 | 101 | | |
| |||
235 | 231 | | |
236 | 232 | | |
237 | 233 | | |
238 | | - | |
239 | | - | |
| 234 | + | |
240 | 235 | | |
241 | 236 | | |
242 | 237 | | |
| |||
317 | 312 | | |
318 | 313 | | |
319 | 314 | | |
320 | | - | |
| 315 | + | |
321 | 316 | | |
322 | 317 | | |
323 | 318 | | |
| |||
483 | 478 | | |
484 | 479 | | |
485 | 480 | | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
| 481 | + | |
490 | 482 | | |
491 | 483 | | |
492 | 484 | | |
| |||
882 | 874 | | |
883 | 875 | | |
884 | 876 | | |
885 | | - | |
886 | | - | |
887 | | - | |
| 877 | + | |
888 | 878 | | |
889 | 879 | | |
890 | 880 | | |
| |||
1039 | 1029 | | |
1040 | 1030 | | |
1041 | 1031 | | |
| 1032 | + | |
1042 | 1033 | | |
1043 | 1034 | | |
1044 | 1035 | | |
1045 | 1036 | | |
1046 | 1037 | | |
1047 | 1038 | | |
1048 | 1039 | | |
1049 | | - | |
1050 | | - | |
| 1040 | + | |
| 1041 | + | |
1051 | 1042 | | |
1052 | 1043 | | |
1053 | 1044 | | |
| |||
1148 | 1139 | | |
1149 | 1140 | | |
1150 | 1141 | | |
1151 | | - | |
1152 | | - | |
| 1142 | + | |
1153 | 1143 | | |
1154 | 1144 | | |
1155 | 1145 | | |
| |||
1172 | 1162 | | |
1173 | 1163 | | |
1174 | 1164 | | |
1175 | | - | |
1176 | | - | |
| 1165 | + | |
1177 | 1166 | | |
1178 | 1167 | | |
1179 | 1168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
0 commit comments