Commit Graph

8277 Commits

Author SHA1 Message Date
Mathias Agopian
e85c021dec remove the now unneeded FL0 materials
Filament needed to compile FL0 materials for both FL0 and FL1, but this
is now done automatically when a material is a FL0 material.
2026-04-15 09:20:26 -07:00
Mathias Agopian
eb3d592d18 expose EntityManager::getIndex() publicly
This can be needed for interactions with an outside entity system.
Use with caution.
2026-04-15 09:19:00 -07:00
Powei Feng
3b5776a232 vk: improve readpixels (#9883)
- Account for multi-sampling in readback
- Add more types for Conversion::getComponentType()
2026-04-14 05:28:00 +00:00
Filament Bot
afb0b39903 [automated] Updating /docs due to commit 562b66c
Full commit hash is 562b66c715

DOCS_ALLOW_DIRECT_EDITS
2026-04-14 04:46:10 +00:00
Powei Feng
54f3490414 Fix ssao precision issue around silhouettes
In the ssao pass, for silhouette pixels,

```
highp vec3 v = p - origin;
```

can be a "long" vector where the length cannot be captured with
mediump on mobile. This means that

```
float vv = dot(v, v);
float vn = dot(v, normal);
```
and other variables can overflow. This caused the silhouettes to
be dark when ssao is turned on a PowerVR gpu.

The fix is use highp for the relevant variables.
2026-04-13 21:43:48 -07:00
Kai
e0b2133333 Fix direct lighting computation 2026-04-13 21:43:13 -07:00
Kai
9887eab8c0 update clearcoat ibl doc 2026-04-13 21:43:13 -07:00
Sungun Park
562b66c715 doc: Clarify MSVC support for windows
See issue #9894 for more context
2026-04-13 21:18:25 -07:00
Mathias Agopian
8ec732dadc FL0 materials are always compile via spirv-cross 2026-04-13 20:53:35 -07:00
Filament Bot
62ac2950c9 [automated] Updating /docs due to commit defba15
Full commit hash is defba15173

DOCS_ALLOW_DIRECT_EDITS
2026-04-13 21:27:53 +00:00
StreetwareGames
defba15173 update the cached image too 2026-04-13 13:58:32 -07:00
StreetwareGames
4b4074450a fix milkyway image url 2026-04-13 13:58:32 -07:00
Mathias Agopian
84dc1b1c43 Add custom color grading LUT support and test UI in gltf_viewer.
Implemented the custom 3D LUT feature in the ColorGrading API, allowing
users to specify a custom LUT for final color mapping.

To test this feature, added a "Custom LUT" option to the color grading
settings in the gltf_viewer sample. This includes several procedurally
generated LUTs for testing purposes:
- Negative
- Grayscale
- Sepia
- Teal and Orange

Updated settings serialization (Settings.cpp) and the viewer UI
(ViewerGui.cpp) to support these options.

FIXES=[362596936]
2026-04-13 13:40:23 -07:00
Jocelin Cailloux
115c2cf8fe Add missing #include <cstring> and <optional> (#9887) 2026-04-10 18:54:05 +00:00
Powei Feng
5fed291284 3p: add models Fox and TransmissionRoughnessTest (#9889) 2026-04-10 05:10:33 +00:00
Powei Feng
7212317a3b android: [render-validation] UI update and enhanced tolerance definition (#9876)
- Update default_test.json with targeted test variants and documented
  tolerance presets.
- Refactor test suite to cover distinct code paths while maintaining
  multi-backend compatibility (OpenGL/Vulkan).
- Integrate TestProgressBar and UI summary text for better test progress
  visualization.
- Enhance validation managers with dynamic naming, zip extraction/export,
  and bundle creation.
- Update validation_app.py terminal UI to support multiple devices,
  device switching, and local result serving.
2026-04-09 15:39:20 -07:00
Ben Doherty
e8ae717c28 Fix null texture pointer crash in GLDescriptorSet (#9884) 2026-04-08 13:00:41 -07:00
Filament Bot
b6cb8096e6 [automated] Updating /docs due to commit be32398
Full commit hash is be3239810a

DOCS_ALLOW_DIRECT_EDITS
2026-04-08 02:09:32 +00:00
Benjamin Doherty
be3239810a Release Filament 1.71.0 rc/1.71.1-cut 2026-04-07 18:41:31 -07:00
Mathias Agopian
e8b268bce4 replace AutoresolveDifferingSampleCounts test
It's not clear what this test was trying to test and its golden was
wrong. 

Removed this test, and replaced it with a simple "autoresolve" test.
2026-04-03 17:02:18 -07:00
Mathias Agopian
88ef82a611 [backend/test] Fix MSAA resolves of depth/stencil attachments
- the first problem was that we don't need (or can) resolve RenderBuffer
  attachments, it's meaningless.

- the bigger problem was that we were marking all attachments of a FBO
  for potential resolve (at FBO creation).  Later, during endRenderPass, 
  the resolve pass itself would be triggered if the RT had a sidecar
  RT. But that's wrong because attachments that match the RT sample
  count don't need to be resolved.
  In turn, this was causing these attachments to be *discarded* 
  because, in beginRenderPass, we were detecting a case where it 
  looked like a MS attachment was used with non a MS rendertarget
  (and filament disallows that, the attachment must be discarded).
  We fix this by making sure attachments that don't need to be
  resolved are not marked as such.


FIXES=[453757787]
2026-04-03 17:02:18 -07:00
Mathias Agopian
b4256c1c15 [backend/test] Fix LoadImageTest.UpdateImageSRGB precision mismatch on OpenGL
Relaxes exact pixel matching for `UpdateImageSRGB` test on software/MESA OpenGL drivers. Linear filtering on sRGB textures produces slightly different fractional weights for edge pixels compared to hardware texturing units.

FIXES=[453756688]
2026-04-03 17:02:18 -07:00
Mathias Agopian
b49b61e131 [backend/test] Fix BlitTest scaling failures on MESA OpenGL
Relaxes exact pixel matching for `ColorMagnify` and `ColorMinify` tests on software/MESA OpenGL drivers. Software blit interpolation (glBlitFramebuffer) produces slightly different fractional weights for edge pixels compared to discrete hardware texturing units. 

FIXES=[453757697, 453758045, 453776623]
2026-04-03 17:02:18 -07:00
Mathias Agopian
92dc063a8a filaflat: Fix missing bounds checks in MaterialChunk::getTextShader (#9873)
- Added a bounds check in the DICTIONARY_NUMERIC_FLAG case to prevent a 
  heap buffer overflow when writing decoded numeric literals.

- Tightened the existing bounds check for dictionary strings to use `>=`
  instead of `>`, preventing a potential off-by-one overflow when 
  writing the null terminator.

- Fixed the `MaterialChunkHeapOverflow` and `MaterialChunkOOBReadText` 
  unit tests in `test_filaflat.cpp` by adding missing header fields to 
  the mock payloads so they correctly pass initialization.

Fixes #9871
2026-04-03 16:02:56 -07:00
Powei Feng
e8fe85ee89 filamat: make DryRunner in Flattener not static (#9872)
This enables multiple thread to use MaterialBuilder/Flattener at
the cost of allocating, deallocating a flattener.
2026-04-03 18:41:50 +00:00
Doris Wu
0b63969aab Make the LruCache size of material/program cache configurable (#9865) 2026-04-03 03:10:14 +00:00
dependabot[bot]
af71d773ae build(deps): bump the npm_and_yarn group across 1 directory with 2 updates (#9870)
Bumps the npm_and_yarn group with 2 updates in the /build/common/upload-release-assets directory: [brace-expansion](https://github.com/juliangruber/brace-expansion) and [minimatch](https://github.com/isaacs/minimatch).


Updates `brace-expansion` from 1.1.12 to 1.1.13
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v1.1.12...v1.1.13)

Updates `minimatch` from 3.1.3 to 3.1.5
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.3...v3.1.5)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.13
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: minimatch
  dependency-version: 3.1.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Powei Feng <powei@google.com>
2026-04-02 17:06:54 +00:00
Mathias Agopian
57faae4645 postfx materials now support sRGB emulation in FL0 (#9866)
FIXES=[498317018]
2026-04-02 09:08:50 -07:00
Filament Bot
e6cf5fa815 [automated] Updating /docs due to commit 426db0a
Full commit hash is 426db0a01d

DOCS_ALLOW_DIRECT_EDITS
2026-04-02 03:37:21 +00:00
Sungun Park
426db0a01d Release Filament 1.70.2 rc/1.71.0-cut 2026-04-01 20:08:07 -07:00
Mathias Agopian
bc0a547701 Support Engine::compile overload to generate view-dependent variants (#9857)
* a new tribool type in libutils (header only)

* Support `Engine::compile` overload to generate view-dependent variants

Implemented an `Engine::compile()` method to infer and generate shader 
permutations directly based on feature states from a provided `View` 
alongside `tribool` settings (skinning, shadowReceiver). 

- Added a new `Material::compile()` overload that directly accepts 
  a precalculated `FixedCapacityVector<Variant>`, decoupling the 
  Material compilation process from specific feature flag checks.

FIXES=[468058969]
2026-04-01 17:08:11 -07:00
Powei Feng
dd1f258a66 settings: add missing renderer options (#9863)
- Move the renderer options to be applied before others before view
   and camera options.
 - Add "render" field to the output of the json description of
   the settings (this was missing).
 - This fixes the Scene->Background Color setting for
   Android's gltf_viewer
2026-04-02 00:04:22 +00:00
Mathias Agopian
16a7047372 Strict bounds validation and parsing optimizations in Ktx1Bundle (#9858)
- Upgraded deserialization precondition checks to fail-fast 
  postconditions.

- Added strict OOB bounds tracking for metadata strings and dynamic 
  payload padding to prevent arbitrary memory corruption
  vulnerabilities.

- Mitigated heap buffer overflows by adding integer boundary constraints
  and dry-running contiguous sizes prior to container allocation.

- Flattened nested layer/face loops via `std::fill_n` and contiguous 
  `memcpy` operations to streamline serialization overhead.

- Updated header documentation explicitly detailing assert 
  circumstances on affected public methods.
2026-03-31 20:26:15 -07:00
Filament Bot
da836c8288 [automated] Updating /docs due to commit 23ee4de
Full commit hash is 23ee4deeab

DOCS_ALLOW_DIRECT_EDITS
2026-03-31 21:24:01 +00:00
Mathias Agopian
23ee4deeab add documentation for specularFactor and specularColorFactor (#9864)
FIXES=[454426385]
2026-03-31 13:56:30 -07:00
Mathias Agopian
face013e86 utils: Enforce geometric resize bounds limits in ostream to prevent massive out-of-bounds heap operations 2026-03-31 11:17:03 -07:00
Mathias Agopian
8f11927aae utils: Truncate oversized CString allocations rather than overflowing internal length logic 2026-03-31 11:17:03 -07:00
Mathias Agopian
2cdff4b521 utils: Protect InternPool references from overflowing to 0 and triggering heap UAF 2026-03-31 11:17:03 -07:00
Mathias Agopian
d1192544ca utils: Protect JobSystem from 8-bit ref-count overflow and UAF cascades 2026-03-31 11:17:03 -07:00
Mathias Agopian
8df899b111 utils: Protect CString routines against integer overflow heap corruption 2026-03-31 11:17:03 -07:00
Mathias Agopian
f8337c42cb utils: Prevent Win32 FindFirstFile handle leaks during exception unwinding in Path::listContents 2026-03-31 11:17:03 -07:00
Mathias Agopian
cb552def6c utils: Enforce format string boundaries to prevent stack injection during Panic events 2026-03-31 11:17:03 -07:00
Mathias Agopian
883f5bae4e utils: Prevent stack buffer leaks by safely trapping snprintf error bounds in Systrace 2026-03-31 11:17:03 -07:00
Mathias Agopian
6713c68791 utils: Enforce 64-bit boundaries and gracefully intercept 0 length in partition_point 2026-03-31 11:17:03 -07:00
Mathias Agopian
bdef97d52c utils: Prevent capacity overflow in StructureOfArrays scaling logic 2026-03-31 11:17:03 -07:00
Mathias Agopian
0016c0808b utils: Fix functional capture move-assignment leaks in Invocable wrappers 2026-03-31 11:17:03 -07:00
Mathias Agopian
c96edc2972 utils: Implement UTILS_MUL_OVERFLOW safely protecting allocators from multiplication overflows 2026-03-31 11:17:03 -07:00
Mathias Agopian
5c5c3b5bb1 utils: Implement generation counter to resolve CyclicBarrier Deadlocks 2026-03-31 11:17:03 -07:00
Mathias Agopian
8ac45bb391 utils: Safely handle NULL pointers returned by dladdr 2026-03-31 11:17:03 -07:00
Mathias Agopian
b351086bc4 utils: Fix integer underflow in generic vector ostream operator 2026-03-31 11:17:03 -07:00