Commit 851284c
committed
Add compositor for UI overlay, property getters for all element types
Add a Compositor to the renderling crate (compositor_vertex +
compositor_fragment shaders) that alpha-blends a source texture onto a
target framebuffer via a fullscreen quad. This fixes the black screen
when overlaying the UI renderer on a 3D stage with MSAA enabled: the UI
now renders to an intermediate texture, resolves MSAA there, and the
compositor blends it onto the final view preserving the scene beneath.
Add property getters to all UI element types (UiRect, UiCircle,
UiEllipse, UiImage, UiPath, UiText) so current values can be read back
— a prerequisite for the upcoming tweening/animation system.
Fix the example app's UI renderer clearing the 3D scene by removing the
erroneous .with_background_color(Vec4::ZERO) call, which was causing a
LoadOp::Clear that wiped the stage output.1 parent 5c05d55 commit 851284c
11 files changed
Lines changed: 601 additions & 16 deletions
File tree
- crates
- example/src
- renderling-ui/src
- renderling
- shaders
- src
- compositor
- linkage
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 86 | + | |
90 | 87 | | |
91 | 88 | | |
92 | 89 | | |
| |||
116 | 113 | | |
117 | 114 | | |
118 | 115 | | |
119 | | - | |
120 | | - | |
| 116 | + | |
121 | 117 | | |
122 | 118 | | |
123 | 119 | | |
| |||
171 | 167 | | |
172 | 168 | | |
173 | 169 | | |
174 | | - | |
| 170 | + | |
175 | 171 | | |
176 | 172 | | |
177 | 173 | | |
| |||
234 | 230 | | |
235 | 231 | | |
236 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
237 | 251 | | |
238 | 252 | | |
239 | 253 | | |
| |||
260 | 274 | | |
261 | 275 | | |
262 | 276 | | |
263 | | - | |
| 277 | + | |
| 278 | + | |
264 | 279 | | |
265 | 280 | | |
266 | 281 | | |
| |||
271 | 286 | | |
272 | 287 | | |
273 | 288 | | |
274 | | - | |
275 | 289 | | |
276 | 290 | | |
277 | 291 | | |
| |||
391 | 405 | | |
392 | 406 | | |
393 | 407 | | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
398 | 412 | | |
399 | 413 | | |
400 | | - | |
| 414 | + | |
401 | 415 | | |
402 | 416 | | |
403 | 417 | | |
| |||
0 commit comments