Introduces a new sample application demonstrating asynchronous resource
management. It shows how to asynchronously create and update Filament
resources (Textures, VertexBuffers, IndexBuffers) and provides examples
of managing chains of asynchronous operations effectively.
BUGS=[442921995]
This commit introduces a significant rework of the Temporal Anti-Aliasing (TAA) system, focusing on improving reconstruction quality, robustness, and introducing flexible upscaling.
Core TAA Algorithm improvements:
- Replaced the Catmull-Rom filter with a more efficient 5-tap Lanczos filter for history sampling, which includes deringing to reduce artifacts.
- The input color buffer is now properly "unjittered" using a Lanczos reconstruction filter.
- Improved the history rejection algorithm by skipping the expensive accurate clipping when the history sample is already within the neighborhood's color gamut.
- Added a new `hdr` option to properly handle HDR content by tonemapping colors before blending and untonemapping the result.
- Removed the ineffective `VARIANCE` only history rejection method.
- Added protection against negative numbers in `sqrt()` for increased stability.
TAA Upscaling:
- Replaced the boolean `upscaling` flag with a float factor, allowing for variable upscaling ratios (e.g., 1.5x, 2x).
- Upscaling now correctly adjusts viewport and projection settings.
- The TAA shader now receives viewport and resolution information to correctly handle upscaled rendering.
API and Configuration Changes:
- Deprecated the `filterWidth` TAA option as it no longer has an effect.
- Introduced the `upscaling` float property to `TemporalAntiAliasingOptions`.
- Added the `hdr` boolean property to `TemporalAntiAliasingOptions`.
Other Changes:
- Updated UI elements in the viewer and material sandbox to reflect the new TAA options.
- Updated Javascript bindings and TypeScript definitions for the new TAA settings.
- Refactored shader code for clarity and performance.
- Add support for vector parameters (float2, float3, float4) in the
parameters file using `{x, y, z}` syntax.
- Allow comments (`#`, `//`) and empty lines in the parameters file.
- Make the end value optional in the parameters file
(defaults to start value).
- Add `--size` / `-S` option to specify viewport dimensions.
- Optimize rendering by pre-filtering active material parameters.
- Remove hardcoded default parameters and silently ignore missing
parameters to support shared configuration files.
- Add documentation for the parameters file format.
filament_test_material should not need to depend on a "fixed"
(or checked in) material.
Now the dependent .filamat is generated as needed as is
packaged with the checked-in test_material.filamat as before.
Building tools separately is necessary for the existing
cross-complation usecase. We generalize this by introducing
two cmake vars that enable exporting and importing
prebuilt tools.
The intended usecase is to enable ASAN-built filament without
having to run ASAN-built matc (which is prohibitively slow).
build.sh has been modified to add a `-y` flag forprebuilding
tools.
* Add new public API to query a sampler transform name field.
This new API will let filament users query a Material object
the value of the `transformName` field of a specified sampler
parameter.
The transformName is an optional field, so if its not defined
by the user, it will return a nullptr value.
- A new test was added to test_filamat to validate the serialization.
- A new parameter was added to the test sandboxLit material to
validate the parsing a material with the new field.
* Addressing review comments
- Add java and js bindings for the new API
- Tests for querying the getParameterTransformName
* Use utils::ImmutableCString for transformName
* Updating release notes
* Review comments
* Addressing more review comments
- Fix comments
- For the java binding return an empty string when the
transform is not present.
* Add a Renderer API to force skipping frames
Renderer::skipNextFrames(size_t) can be used to force filament to
pretend the next N frames must be skipped. This is mostly useful for
debugging.
* Add DebugOptions to Settings
We still need to move the "Debug" features of gltf_viewer to this,
but this give us a framework to do it.
Currently there is one debug option that allows to set a number of
frames to skip.
ViewerGui propose a button to skip 10 frames using this framework
* Update libs/viewer/src/Settings.cpp
Co-authored-by: Powei Feng <powei@google.com>
* Update libs/viewer/src/Settings.cpp
Co-authored-by: Powei Feng <powei@google.com>
---------
Co-authored-by: Powei Feng <powei@google.com>
* slice: fix memory semantics
* slice: prefer passing slice by value
This lets us do nice things like coercing Slice<T> to Slice<const T>, etc.
* slice: fix unit tests
* slice: fix copy/assignment, hash function
Don't attempt to define a copy constructor/assignment operator which would
convert a constant type to a mutable type.
Additionally, fix the hash function such that we're hashing U instead of const
U.
FilamentApp now has debugging options to enable or disable the
camera and directional shadow frustums, as well as the new
"froxel grid" visualization.
"froxel grid" is automatically enabled when "froxel debugging" is
enabled in the debug gui in gltf_viewer.
New corresponding debugging APIs were added to View.
- Add a Configuration struct to the WebGPUPlatform class. This
allows for client-side setting of WebGPU backend configurations.
- Add a configuration for forcing the wgpu backend to pick a
certain backend.
- Add Vulkan as a potential backend for WebGPU + MacOS.
- Locally modify Dawn so that it does not assume only switfshader
is available for Vulkan on MacOS.
- Enable vulkan support for Dawn (third_party/dawn/tnt/CMakeLists.txt)
- Plumb option to pick different WebGPU backend through
FilamentApp and gltf_viewer.
* [Fix] frame_generator sample: open ifstream with ios::binary
* [Fix] frame_generator sample: allocate storage for g_materialBuffer
reserve() merely reserves memory, but does not actually change the size of the vector.
* [Fix] frame_generator sample: destroy materials/renderables during cleanup
Otherwise the sample crashes with a Filament error saying that the material is still associated with a renderable.
* materials: introduce mutable spec constants
Rationale & design of this feature has been discussed internally.
The current implementation uses a `FixedCapacityVector` to store the new program
handles, but I wouldn't object to replacing it with a hasmap as discussed
offline.
I have compiled but not tested this yet on Android, so I'm not certain that the
API bindings are correctly wired up.
* materials: mutable spec constant feedback
* materials: address mutable spec constant comments
Attach MetalLayer to Native View same as vulkan and metal backend.
This change assumes native window is already a CAMetalLayer. This is no different
for IOS and Mac.
Initial groundwork in creating WebGPU backend components, namely
the instance, adapter, device, and queue.
If configured to do so, the backend will print out details about
these components.
The samples/hellotriangle.cpp was slightly modified to include a
webgpu option which allows for exercising the above, but does not
yet draw anything to the screen/window.
NOTE: This has only been sanity tested with hello triangle
on Mac OS and the Android emulator at this time, NOT IOS,
Windows, or Linux yet.
PPM does not store alpha channel, but TIFF does. We add a method
to export RGBA to a TIFF file without compression.
We add the corresponding options to gltf_viewer and
AutomationEngine.
The default export format for both gltf_viewer and AutomationEngine
is now TIFF.
The commit 1747ae8f5a enfoces a correct
order for releasing resource. Fix the order to avoid crashes.
Make some samples to use the DEPTH32F format for better compatibility.
Some manufacturers don't fully support DEPTH24 on Vulkan. E.g., AMD
Radeon PRO W6400
Currently mLayerCount for RenderTarget is always updated to the number
of depth for attachments, which incurs unintended behaviors for some
types of textures. i.e., 2d array, cubemap array, and 3d textures.
Fix this by updating mLayerCount only for multiview use case.
BUGS=[369165616]
- Both Scene and IBL are holding on to a skybox reference. We
need to make sure the order they are destroyed in right order.
- Reloading IBL should trigger resetting the indrect light in
gltf_viewer.
Clients can create a multi-layered render target that consists of array
textures, and use it as a custom render target.
A new sample app "hellostereo" demonstrates how to use this feature.
vk, metal and desktop gl all support depth clamp, GLES/android also does
with ANGLE. Add support for it in the backends.
use depth clamp to improve directional shadow quality; this allows
to render everything that's behind the camera at the same "zero" depth,
so we can reduce the depth range we need.
Fixes#6293