- **Stars**:
- Implemented procedural stars using hash-based noise.
- Added UI controls for Star Density and Enable/Disable.
- Tuned star brightness (reduced intensity) and refined twilight fade timing (visible during nautical twilight).
- Improved compositing with aggressive cloud occlusion and non-linear fade.
- Added star reflections to water, strictly masked to the horizon line.
- **Heat Shimmer**:
- Fixed horizon artifacts by decoupling shimmer from atmospheric density (Mie scattering).
- Implemented FBM-based view distortion for heat waves.
- Added sun elevation fade (shimmer fades out as sun rises > 30°).
- **Water**:
- Implemented Finite Difference normal calculation as a high-quality fallback when "Derivative Trick" is disabled.
- Added "Octaves" parameter to control wave detail.
- Refined reflection logic to handle stars and sun disk properly.
- **System**:
- Updated [simulated_skybox.mat](cci:7://file:///Users/mathias/sources/git/filament/docs_src/src_raw/wip/sky/simulated_skybox.mat:0:0-0:0) with new material parameters (`starControl`, `waterControl`).
- Refactored JS bindings in [SimulatedSkybox.js](cci:7://file:///Users/mathias/sources/git/filament/docs_src/src_raw/wip/sky/SimulatedSkybox.js:0:0-0:0) and organized `main.js` UI into logical folders.
DOCS_FORCE
PerformanceHint manager needs a java thread during initialization,
so we need to attach a jvm to the thread that's going to be used.
That thread is the filament backend thread, not necessarily the thread
the platform is created on.
So we make sure to do that from the backend thread.
FIXES=[427945768]
Currently, in Vulkan, we set the pipeline layout when binding the
pipeline, which doesn't happen until draw time when external samplers
are present. In cases like that, we push constants with the layout
VK_NULL_HANDLE, which is not valid. Instead, we can wait until the
pipeline layout is known, and then flush all push constants.
The command batching logic in RenderPass::Executor::execute calculates a
conservative `maxCommandSizeInBytes` to determine how many commands can
safely fit in the driver's circular buffer.
However, this calculation failed to account for the dynamic memory
allocation incurred by the Per-Material descriptor set binding (via
`MaterialInstance::use`). This binding allocates a `DescriptorSetOffsetArray`
in the command stream, which was unbudgeted.
In scenarios with frequent material and scissor changes, the accumulated
deficit from these unbudgeted allocations could exceed the buffer
capacity, leading to a crash.
This change:
1. Adds the missing accounting for the Per-Material dynamic allocation
to `maxCommandSizeInBytes`.
2. Adds a 20% safety margin to the calculated size to robustly handle
alignment padding and worst-case scenarios.
FIXES=[474264976]
- Add plumbing to add more information about rendertargets
(including discard flags and pass id) to the fgviewer pass
struct.
- Add UI to display information about a selected pass
- Highlight a selected resource or pass
The new tone mapper, dubbed "GT7" in the code, is based on
the Gran Turismo 7 tone mapper, as described in the SIGGRAPH
2025 presentation called "Driving Toward Reality: Physically
Based Tone Mapping and Perceptual Fidelity in Gran Turismo 7".
This tone mapper exhibits fewer hue skews than the other tone
mappers, at the exception of PBR Neutral. The GT7 tone mapper
is however better at preserving the perception of high
dynamic range.
The tone mapper, as implemented, targets an SDR paper white
of 250 nits, using 100 cd/m^2 as the reference luminance (for
values of 1.0 in the linear HDR framebuffer). This can result
in an overall darker image compared to the other tone mappers
but this can be controlled through camera settings, post-
processing exposure, or lighting intensity.
The GT7 tone mapper also allows to target HDR output, and
could be made customizable via APIs if desired. The current
implementation offers a fixed aesthetic solution.
- Add documentation for specgen along with proper math rendering
- Adjust the heading size, capitalization of various READMEs.
- Add backend test README to the doc
- Rename the CI related tests to have prefix "CI:"
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]
- Pick a default view when database is filled.
- Fix d3, d3-graphviz depdency.
- reduce the size into a smaller table (to avoid scrolling)
- slant the pass items to allow smaller cells for the table.
- make subresource rendering the same as regular resource
rendering with a color hint.
- Use color-only to indicate resource/pass interaction (read,
write, read-write, no-access)
- add tooltip to indicate resource action
Right now, if a material is destroyed just after creation, it's possible
for prewarm to attempt to use destroyed shader modules. This ensures
that the resources are kept until after any queued jobs have run.
While it is likely ideal to properly cancel the prewarm if the program
has been destroyed, this seems like a rare occurrence in practice.
When an asynchronous object is destroyed immediately after creation, the
background creation process may still be active, holding a reference to
the object. We now defer destruction in these cases until the creation
process completes to ensure the reference remains valid.
Implementation details:
1. Add a mechanism to stop the ServiceThread to drain pending
asynchronous tasks earlier. This ensures the mCreationComplete flag
in the frontend object is set to true.
2. Later, the engine's terminate performs garbage collection for the
deferred destruction. All of them must be successfully processed.
BUGS=[442921995]
- Reorder the release-related documents into one heading.
- Added CocoaPods README as part of the documentation.
- Fixed typo for renderdiff doc
- Added backend test doc
Certain older compilers (e.g. clang in NDK 25.1.8937393) cannot
handle the c++ stylistic changes that were recently added
(though they are correct by spec).
- In Engine.cpp, .find() cannot automatically infer the right type
(std::string_view vs. utils::CString).
- In fg/framegraph, various templated short-hands still require
typename.
* feat(engine): Add automatic frame skipping to manage CPU/GPU latency
Introduces a new feature, disabled by default, that allows the engine to automatically skip frames when the CPU gets too far ahead of the display's refresh rate. This helps to reduce overall latency by preventing a backlog of frames from building up in the driver queue.
The feature can be enabled with the "engine.skip_frame_when_cpu_ahead_of_display" property.
To implement this, the compositor timing mechanism has been refactored. Instead of reporting an absolute `expectedPresentTime`, the backend now provides an `expectedPresentLatency` relative to vsync. This is more robust against synchronization issues with platform callbacks (like Android's Choreographer), as the latency is generally a constant value.
BUGS=[474599530]
Removed implicit dependency on FEngine::getDriverApi() in critical
rendering paths. This change makes the DriverApi dependency explicit by
passing it as a parameter.
Key changes:
- FRenderer: Now accepts DriverApi& in renderInternal and renderJob.
Caches feature levels and capability flags in the constructor.
- PostProcessManager: Caches feature flags and workaround flags in
init(). Updated PostProcessMaterial and configure* methods to accept
DriverApi&.
- FMaterial: Caches support flags (stereo, parallel shader compile) and
default material pointer in the constructor.
Updated precacheDepthVariants and prepareProgram to rely on these
cached values or passed parameters.
- ShadowMapManager: Caches workaround flags in the constructor.
- FEngine: Updated prepare() to accept DriverApi&.
- RenderPass: Updated to accept DriverApi& in constructor and
appendCommands.
- Removed implicit DriverApi calls from hot paths to reduce overhead
and improve safety.
One common pattern in this change is to cache getters in constructors
so that we don't need the DriverApi dependency later during rendering.
The intention here is to remove DriverApi& from as many places as
possible so that we can later have multithreading for command
recording.
This PR should not change any behavior.
This commit clarifies and corrects documentation in several public header
files. The changes include fixing typos, improving wording, and adding
missing details to make the API easier to understand and use.
No functional changes are included in this commit.
Provides logic to load and check for external format ids, and
build fake pipelines against them when relevant, to prevent
hitching when using external formats.
For now, we're going to use upto five likely types of YCbCr
conversions, which seem to cover all usecases encountered. This
means we might compile pipelines with external samplers a total of
4 additional times on top of the baseline (5 in total), or 3 additional
times on the devices we're currently testing (4 in total).
* Add base pipeline prewarm call for ext samplers
This is necessary because in some cases, a material that supports
external samplers will use RGB inputs instead of YCbCr inputs, and will
miss the cache.
* split FeatureFlagManager out of FEngine
- Separate the Feature flags management from FEngine.
- Make FeatureFlagManager available to backends through DriverConfig
- add a way to override a feature flag value at runtime using
environment variables or system properties (on Android).
e.g.:
```
env "feature.name=true" gltf_viewer
```
or
```
adb shell setprop debug.feature.name true
```
Co-authored-by: Powei Feng <powei@google.com>