Commit 09713ab
fix(renderer): preserve float precision through bilinear un-premultiply
sample_bilinear_rgba rounded premultiplied RGB to u8 before the
un-premultiply step, losing sub-pixel precision and producing dark/
bright halos on semi-transparent sprite edges after rotation.
Keep RGB in float space through interpolation + un-premultiply and
only round/clamp once at the end.
Co-authored-by: DeepSeek V4 <deepseek@v4.ai>1 parent 063cf38 commit 09713ab
1 file changed
Lines changed: 16 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1126 | 1126 | | |
1127 | 1127 | | |
1128 | 1128 | | |
1129 | | - | |
1130 | | - | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1131 | 1133 | | |
1132 | 1134 | | |
1133 | | - | |
| 1135 | + | |
1134 | 1136 | | |
1135 | | - | |
| 1137 | + | |
| 1138 | + | |
1136 | 1139 | | |
1137 | 1140 | | |
1138 | | - | |
1139 | | - | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1140 | 1146 | | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1145 | 1151 | | |
1146 | 1152 | | |
1147 | 1153 | | |
| |||
0 commit comments