This shaves 20 bytes off of each model vertex, or around 40% savings.
The vertex size is also a power of two which results in extreme amounts
of style points.
+Z is the front face in a cubemap, not -Z. Currently cubemap faces are
flipped in both the X and Z directions.
Some kind of flip is required because cubemaps use a left-handed
coordinate space instead of lovr's/vulkan's right-handed coordinate
space.
Equirect does not need any changes.
- Cubemaps can have any layer count that is a multiple of 6.
- A cubemap with more than 6 layers will be a cubemap array image view.
- This isn't perfect because it conflates regular cubemaps with
6-layer cubemap arrays.
- Enable the vk feature, handle the spv feature, add getPixel helper.
- state.features.overlay should remain a bool since it just indicates
whether the extension is supported/enabled.
- split the config value into a bool/u32 pair so the full u32 range can
be used for the order (seems important to coordinate with other apps).
- Also you can use a boolean now like before, which uses 0 as the order.
- Add newSurface, which returns a "blank" surface, allowing you to set
your own properties.
- Add finalizeSurface, which sets computed surface properties and clamps
values to prepare for lighting.
- Add applyMaterial, which takes all of the properties in the material
and applies them to a surface
- Add helper functions for getting properties from the Material, which
combine scalar factors and texture samples while respecting shader
flags:
- getMaterialBaseColor
- getMaterialEmissive
- getMaterialMetalness
- getMaterialRoughness
- getMaterialOcclusion
- getMaterialClearcoat
- getMaterialClearcoatRoughness
- Add getDefaultSurface, which returns what initSurface would result in
today, deprecating initSurface.
- Last row of transform matrix is unused, make it 4x3
- Requires funny row-major packing due to vec3 std140 padding.
- Teach spirv parser to tolerate non-square matrix types, though
they aren't supported anywhere else yet.
- Compute cofactor in shader for normal matrix, ALU is free,
optimize out many terms, rm maf_cofactor.
- Take out complex UBO alignment logic since stuff is PO2 these days.
This was a common bottleneck for some workloads, so there are measurable
performance gains (up to 2x faster pass submission on CPU). GPU time is
identical, at least on desktop.
Some compile fixes and a rename from gpu_wgpu to gpu_web, since wgpu
refers to a specific implementation of WebGPU and I'm really bad at
typing it for some reason.
- Adds Pass:setViewCull to enable/disable frustum culling.
- Renames Pass:setCullMode to Pass:setFaceCull (with backcompat).
Some stuff currently missing:
- Text is not culled, but should be.
- VR view frusta are not merged yet.
Origin type used to be a query-able property of the VR system that
indicated whether the tracking was roomscale or seated-scale.
The t.headset.offset config value could be used to design an
origin-agnostic experience, which by default shifted content up 1.7
meters when tracking was seated-scale. That way, stuff rendered at
y=1.7m was always at "eye level". It worked pretty well.
It's getting replaced with a t.headset.seated flag.
- If seated is false (the default), the origin of the coordinate space
will be on the floor, enabling the y=1.7m eye level paradigm. If
tracking is not roomscale, a floor offset of 1.7m will be emulated.
- If seated is true, the origin of the coordinate space will be y=0
at eye level (where the headset was when the app started). This is
the case on both roomscale and seated-scale tracking.
So basically 'seated' is an opt-in preference for where the app wants
its vertical origin to be.
One advantage of this is that it's possible to consistently get a y=0
eye level coordinate space, which was not possible before. This makes
it easier to design simpler experiences that only need to render a
floating UI and don't want to render a full environment or deal with
offsetting everything relative to a 'floor'. This also makes it easier
to implement hybrid VR+flatscreen experiences, because the camera is at
y=0 when the headset module is disabled.
The opt-in nature of the flag, coupled with the fact that it is
consistent across all types of tracking and hardware, is hopefully a
more useful design.
The error screen uses an orthographic projection when rendered in a
window, so the text is always the same size instead of scaling with the
window size.
Also you can close it with escape.