Commit Graph

2 Commits

Author SHA1 Message Date
Matthias Clasen
3aaea0ef40 Clip intermediate textures
In some cases, we were creating gigantic intermediate textures
only to clip out a small section afterwards (e.g. in the listbox
example in gtk4-demo). This is wasteful if we apply effects on
the texture, such as blur or color-matrix. So, clip the dimensions
of the intermediate texture with the current clip. To make this
feasible, we move the texture coordinate computation out of the
pipeline setup functions into the node_as_texture function where
this clipping happens.

One extra complication we encounter is that the node might get
clipped away completely. Since Vulkan does not allow to create
empty images, we bail out in this case and not draw anything.

With these changes, the listbox example in gtk4-demo goes from
32M pixels of intermediate texture to 320000.
2017-10-01 19:22:04 -04:00
Matthias Clasen
a75d995bd4 vulkan: Implement crossfade
This is the first shader using two textures. It almost works.
2017-09-22 22:16:10 -04:00