- You can nest texture views (make a view of a view).
- You can do transfers on views (copies, clears, blits, etc.).
- You can give labels to views.
- API changes
- Rename Texture:newView to lovr.graphics.newTextureView.
- Constructor takes a table of options (order was too confusing).
- Remove Texture:isView/getParent, since views can be used for everything now.
- Better matches what LÖVE ended up doing.
- Fix bug where :getType on a view returned parent type.
Previously, when switching shaders, resource bindings would be preserved
for resources with matching slots/types. This doesn't make sense in a
world where binding numbers are internal. Instead, match up resources
by name/type.
Additionally, rewire all the uniforms by name/size so uniforms with the
same name get preserved (name/type would be too hard for e.g. structs).
This seems like it would be horribly slow and may need to be optimized,
optional, or removed.
I didn't test any of this lol, but I will I promise.
The vertex-only shader requires too much juggling of shader stage flags
and pipeline layout compatibility when e.g. binding push constants and
descriptor sets.
This is a little slower, but means indirect draws can use Transform and Color.
There are other solutions for this. For example LÖVR could reserve
BaseInstance and use a compute shader to rewrite indirect buffers.
For now we choose to be correct and a little slower.
- Undeprecate ShaderType (it's good actually, kinda like a pipeline bind
point and more specific than having lovr trying to make sense of a
random set of stages).
- Use a default uniform block instead of push constants. The Constants
macro now maps to a uniform block declaration.
- It is no longer possible to create a shader by giving a single
DefaultShader string (you can still give a per-stage DefaultShader
though).
- lovr.graphics.compileShader now takes all stages instead of a single
stage. In general we need all stages when compiling GLSL because
default uniforms require linking across stages.
The new values come from comments in the official HelloWorld.cpp. After
the changes the any increase of memory consumption is within the
measurement error.