* Try to clean up asset folders for sample apps.
This removes the build step where we copy a subset of assets, and makes
it so that FilamentApp hands out a "root path" for assets. For now this
is determined based on the location of the executable. This allows
developers to launch samples from any CWD.
Closes#11
* Restore asset copy to build.
This implements the following suggestions from Adam Sawicki:
(1) Update VkMemAlloc to dev branch.
(2) Use VMA_MEMORY_USAGE_CPU_ONLY in the stage pool.
(2) Add vmaFlush after every vmaUnmap.
We also considered removing Map / Unmap in favor of persistent mapping
via VMA_ALLOCATION_CREATE_MAPPED_BIT, but decided to be conservative
until we have a chance to rethink our UBO update strategy.
Closes#19
- improve API of computeLightTree() which should
now be functional.
- pre-calculate the range of each light in
screen-space, so we don’t have to do so
over and over again in computeLightTree().
- define the GPU-side “node” for the light-tree,
this is a place-holder until we really implement it.
computeLightTree() takes a list of light as
a bitfield and produces a depth-first
binary tree array that can be used to efficiently
check which lights volumes contain a given z
coordinate in screen space.
Currently computeLightTree() produces the array
locally on the stack, which isn’t useful, but
before we can make use of it, a lot of other
things have to happen.
* Add option USE_EXTERNAL_GLES3
Causes gl_headers to use GLES, even on desktop.
Causes all ContextManagers to be elided;
users are expected to provide their own.
* FrameUniforms.resolution gets consistent precision between VS/FS
* Introduce mipgen frontend.
For now this is fairly simple although it does let you choose a filter.
Another cool feature is that an HTML file is generated which makes it
easy to review the generated miplevels.
This does not expose the Boundary enum to users because it has not yet
been implemented in the core Image library.
* Fix up mipgen per code review.
* Document better BRDFs
- Document the loss of energy in the specular BRDF
- Start documenting the gain of energy in the diffuse BRDF
* Explain energy compensation with second scaled lobe
* Add multiscattering pre-integration
* better froxel records compression
We used to compress froxel records by reusing the
previous record on the left if it was identical,
now we additionally check the record above if
that fails.
In practice this saves 10% to 30% space in the
froxel record buffer, which is a scarce resource
for us.
e.g. if a light occupied 3x3 froxels in a given
z-slice, without compression 9 records would be
used, with left-only compression, only 3,
and with left+above compression, only 1.
* use size_t for in and out parameters
this helps the compiler in many places, not
having to cast from 64 to 32 bits.
* implement bitset’s any() and all() operations with NEON
* empty froxels are a common case, handle it first
This changes the layout of the froxels data
structure in the GPU so that the major axis
is the Z axis instead of X. The idea is that
within a given screen-space tile, we have a high
probability to access froxels at the same x/y
but different z.
This is turned off right now, as it requires
a change that breaks existing compiled materials.
apparently off-by-one’s hard. The first row of
our *source* froxel data must be skipped because
it contains a bit mask representing wether a light
is point or spot.
* Enhance CMake compiler check
This commit adds a check for compilers that don't meet the project's
minimum requirements. It will catch Clang versions that are too low as
well as any non-Clang compilers.
* Change SEND_ERROR to FATAL_ERROR