This is not intended to be used yet because we're not currently
checking that cubemap array are actually supported, however, if they
are, they should work.
The main goal is to allow more flexibility, allow cubemap arrays in
the future and better match vk and metal apis.
Main changes:
- remove updateCubeImage
- remove update2DImage
- update3DImage is now the only texture upload backend API
cubemaps are now treated just like a 2D array of 6 layers.
For this reason, Texture::setImage(..., FaceOFfsets) is deprecated.
Additionally, the 2D versions of Texture::setImage() become inline
helpers.
A side effect of this change is that it is now possible to update only
a single face of a cubemap, but also a region of a face (or faces).
BlobDictionary and LineDictionary were storing blobs as map keys to
achieve simple compression, but they also stored duplicates of
in a vector for index-based lookup.
Now, the vector is storage and the map has keys that are string_view.
- getNear() and getCullingFar() now return doubles
- updated documentation
- all setProjection() calls can now throw (when enabled) and will
do so if preconditions are not met (instead of setting a default
projection).
- Frustum can now be logged on debug builds
auto-instancing can have some overhead, so when it is known that the
scene doesn't have identical primitives, it is better to disable it.
(disabled by default).
Also add some missing bindings for `enableAccurateTranslations`.
Reflects a change from Betty and should be cherry picked to v1.23.3
Users could customize the ImGuiHelper camera, but they had no control
over the scissor coordinates. This allows them to use vertically flipped
coordinates, which, unfortunately, is required for MediaPipe
integration.
This was too tricky, it highlights that we definitely need refactor this
to share code with the flattener / unflattener pipeline. I'll look at
that next.
* BlueVKDarwin: Simplify the build and loading process.
Some of our CMake logic was not necessary because we do not staticly
link against anything for Vulkan. All entry points are dynamically
loaded.
Some of the load-time code was also needlessly complicated. In fact the
ICD environment variable that we were setting is now deprecated.
I tested this PR with:
- macOS + June LunarG SDK
- Android on a Pixel 6
* Fix up, further simplification.
This will allow us to fix the validation error related to
VK_KHR_portability_enumeration.
Also, macOS comes with Python 3 nowadays so we're upgrading the script
from Python 2.
- rename PerRenderableUibBones to PerRenderableBonesUib to be more
consistant with other interface block naming.
- make sure the C++ struct and the UBO definition match.
PerRenderableBonesUib is a UBO with one bones[256] field, but the
C++ struct has a single bone and treated the UBO as an array.
This makes things less confusing.
We can now use sizeof(PerRenderableBonesUib) in many places which
better expresse what we are doing.
- Fix an off-by-one assert when setting a skinning buffer to a renderable
- Asserts that no more than 256 bones are associated to a renderable
- improve documentation and fix some typos
We no longer use the hardcoded objectUniform UBO name, instead, we
access the object uniforms through the new getObjectUniforms().
Because it's not possible to return a "Uniform Block" from a function
in GLSL, a large part of this change, is to replace the interface block
by a structure.
Note: getObjectUniforms() is not public, but it is used by gltfio to
access the userData field, which is also not public at the moment.
We still use resgen for convience, but the archive is now passed in
from the client application.
This will allow us to shrink the gltfio Android library (stay tuned).
This boolean parameter is used with materials that need to access
`getInstanceIndex()` (filament's equivalent to `gl_InstanceIndex`).
It is false by default, and getInstanceIndex() is not accessible.
This is intended to be used in concert with
`RenderableManager::Builder::instances()`.
An ubershader archive is a bundle of filamat packages with some metadata
that conveys which glTF features each material supports.
This PR does three things:
1. Adds a new command line tool called `uberz` that consumes a list
of filamat files and metadata text files and produces a single
ubershader archive.
2. Adds a new library (also called `uberz`) that is used by `gltfio`
to read ubershader archives, and used by the above command line
tool to write ubershader archives.
3. Enhances `UbershaderLoader` so that it no longers uses a hardcoded
set of materials, and instead takes an ubershader archive.
Ubershader archives have a simple binary layout that can be memcpy'd
directly into a C struct. The metadata is specified using a text file
with key-value pairs. These two file formats have formal desriptions in
the README in `libs/uberz`.
In a subsequent PR, we will remove the `gltfio_resources` target and
change the signature of `createUbershaderLoader` so that it takes
an archive.