Commit Graph

1112 Commits

Author SHA1 Message Date
Mathias Agopian
45f68909d7 Fix dynamic resolution with TRANSLUCENT views
A few bugs in that area were introduced by #8391. Upscaling is 
supposed to perform the final blending if needed, but it didn't.
Transparency/blending is only supported by the bilinear upscaler, which
is automatically selected in that case.

The upscaling pass itself may include a final `RCAS` pass for
sharpening, in that case, blending must be performed then. So we added
the logic for that.


Fixes #9061
2025-08-13 16:53:16 -07:00
Benjamin Doherty
a9f2253d93 Release Filament 1.63.1 2025-08-13 11:47:16 -04:00
Powei Feng
c21f211a13 Update java for Texture::Usage (#9055)
Also update samples and utils to use proper usage when
generating mipmaps.
2025-08-11 19:47:26 +00:00
Mathias Agopian
db14efc151 compress the DFG LUT with zstd
- use resgen to package the DFG LUT into filament, instead of using
  a large include of a C array.

- add a zstd compression step, which reduces the size from ~100KB to
  ~75KB.

The overhead of zstd is about 90KB uncompressed, however it will pay
for itself tenfold when we use it to compress material packages.
2025-08-07 14:58:18 -07:00
Mathias Agopian
71d0723026 add zstd to the build 2025-08-07 14:58:18 -07:00
Mathias Agopian
b92af357f7 add a material option to use linear fog calculations (#9030)
The new `linearFog` material property, when set to `true` enables a
simplified fog calculation. The fog equation becomes linear which is
unrealistic, but more efficient to compute. In some situations with
a shallow fog range, it doesn't make a huge difference visually.

In this mode, height falloff and in-scattering are ignored.

The linear equation slope is calculated from the regular parameters to
match the slope of the real equation at a camera height. If 
`heightFalloff` is disabled, set to 0, the `density` parameter 
exactly corresponds to the slope of the equation in [1/m] units.
2025-08-07 01:33:36 -07:00
Mathias Agopian
7f18c7fd43 fix -d (matdbg) build option
There was two problems:
- tint was needed regardless of webgpu support
- libfilamat wasn't built on the android side
  (I don't know how it ever worked)
2025-08-06 17:29:51 -07:00
Eliza
5924633085 gl: amortize shader compilation over N frames (#8964)
* gl: amortize shader compilation over N frames

On platforms which don't support parallel shader compilation (e.g. Firefox), we
can sort of emulate it by queueing up any requests to `Material::compile()` and
compiling each shader over multiple frames.

Compiling over consecutive frames slows things quite noticeably. Instead, space
each compilation over a number of ticks (16 chosen arbitrarily).

If we need a program NOW, we can bump a program queued for much later to the
front. We also avoid compiling any queued programs on this same frame to limit
stuttering.

* gl: add flag to disable amortized shader compile

If this flag is on, the new amortized compile code should theoretically never be
executed.

* gl: add CompilerPriorityQueue docs, Java API

* gl: amortize shaders, z3moon feedback

* gl: update CompilerThreadPool
2025-08-06 21:09:27 +00:00
Powei Feng
ac076e872e Release Filament 1.63.0 2025-08-05 22:59:34 -07:00
Benjamin Doherty
bbced6d59d Release Filament 1.62.2 2025-07-31 10:27:23 -07:00
Mathias Agopian
70d41664b5 Add Renderer::shouldRenderFrame() API
FIXES=[410463814]
2025-07-30 15:32:23 -07:00
Sungun Park
36f7911917 Release Filament 1.62.1 2025-07-14 23:11:18 +00:00
Mathias Agopian
29ed42fa98 dynamic resolution can be always be enable if minScale==maxScale
normally dynamic resolution is turned off when timerQueries are no
available, but we should still allow it if minScale==maxScale.

FIXES=[428767320]
2025-07-14 10:32:48 -07:00
Mathias Agopian
f6f7082b55 Make libfilament.java use libfilament-generatePrefilterMipmap 2025-07-07 14:16:16 -07:00
Powei Feng
74445904f2 Release Filament 1.62.0 2025-06-30 16:39:15 -07:00
Powei Feng
3d0653604f android: add static, default model for gltf-viewer (#8898)
The default gltf for android's gltf-viewer is the buster drone,
which uses skinning.

We add an additional model (damaged helmet) as an alternative
default. This will be useful for debugging WebGPU, where skinnning is
not yet supported. This alternate path can only be invoke by starting
the app through adb:

  `adb shell am start -n com.google.android.filament.gltf/.MainActivity --ez "use-static-model" true`
2025-06-26 19:15:54 +00:00
Powei Feng
468d9cccb7 Add Engine config for gpu priority (#8893) 2025-06-26 17:47:57 +00:00
Benjamin Doherty
c84d04254e Release Filament 1.61.2 2025-06-25 12:29:24 -07:00
utzcoz
eb5d9ac15d android: Update gradlew files to the upstream version (#8802)
Run twice:

./gradlew wrapper --gradle-version 8.8 --distribution-type bin
2025-06-18 05:22:59 +00:00
Sungun Park
09545690bf Revert "materials: introduce mutable spec constants (#8795)"
This reverts commit 8a1a0b0fd2.
2025-06-13 15:02:55 -07:00
Sungun Park
880cd66166 Release Filament 1.61.1 2025-06-12 00:31:33 +00:00
Ben Doherty
3ea8e529cc Switch filament and backend to Abseil logging (#8691) 2025-06-11 10:08:52 -07:00
Eliza
8a1a0b0fd2 materials: introduce mutable spec constants (#8795)
* 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
2025-06-06 03:52:20 +00:00
Powei Feng
1d2e165d99 Release Filament 1.61.0 2025-06-03 12:02:10 -07:00
Benjamin Doherty
315b53c339 Release Filament 1.60.1 2025-05-20 12:42:33 -07:00
Doris Wu
fe474a9d7e Add GTAO shader support (#8688)
* Add GTAO options into the struct

* Add gtao mat and shader

* Set type specific parameters in ppm

* Fix inconsistent name

* Fix incorrect param type

* Add bent normal calculation

* Fix the gui

* Adjust precision

* Use mix

* Add some comments

* Refactoring

* Update comments

* Add comments for aoOptions

* Update

* Update

* Address the comments

* Split .mat into bent and non-bent

* Update

* Update

* Use sqrt on mobile

* Omit default case

* Commit beamsplitter generated changes

* Use built-in acosFast

* Remove unused function

* Fix the mismatched parameter type

* Some optimizations

* Commit beamsplitter results

* Update the comment

* Update default value

* Commit beamsplitter changes

* Extract common parameters out
2025-05-16 00:13:12 +00:00
Sungun Park
cc7361dba5 Release Filament 1.60.0 2025-05-13 21:27:27 +00:00
Sungun Park
5b3f13fc1d Revert "Add getter functions for settings to build ColorGrading object (#8699)"
This reverts commit f10d226565.
2025-05-13 11:22:33 -07:00
Powei Feng
7ccbdb4633 Release Filament 1.59.5 2025-05-08 09:06:44 -07:00
Daisuke Kasuga
f10d226565 Add getter functions for settings to build ColorGrading object (#8699)
* add getter methods for ColorGrading builder settings
* add tone mapper impl clone funcs
* update the release notes
---------

Co-authored-by: Daisuke Kasuga <dkasuga@google.com>
2025-05-09 00:43:40 +09:00
Benjamin Doherty
9b356926b8 Release Filament 1.59.4 2025-05-01 17:33:19 -07:00
Mathias Agopian
29919e64cd update remote ui, web samples and documentation 2025-05-01 10:21:27 -07:00
Mathias Agopian
42c760a92f add the Perfetto SDK to libutils
for android NDK projects we also need to add it to the dependent
libraries.
2025-04-22 09:31:29 -07:00
Sungun Park
6dac384bd9 Release Filament 1.59.3 2025-04-21 22:05:28 +00:00
Powei Feng
21dd1319df Release Filament 1.59.2 2025-04-16 15:47:19 -07:00
Benjamin Doherty
757640e850 Release Filament 1.59.1 2025-04-09 10:20:51 -07:00
Andy Hovingh
2e37ebe70c webgpu: compile WGSL shaders into Android materials when needed 2025-04-08 13:13:21 -05:00
Sungun Park
87dbd59275 Release Filament 1.59.0 2025-03-31 22:23:12 +00:00
Powei Feng
06c0667636 Release Filament 1.58.2 2025-03-28 15:34:06 -07:00
Benjamin Doherty
6066e3a461 Release Filament 1.58.1 2025-03-19 16:17:13 -07:00
Eliza Velasquez
65861b85cf 1dlut: fix psychadelic lookup tables 2025-03-19 12:15:35 -07:00
Eliza Velasquez
daa359717b 1dlut: mathias feedback 2025-03-19 12:15:35 -07:00
Eliza Velasquez
4fbfd1b8c1 Generate 1D LUTs for color grading when possible
This introduces two new methods to `ToneMapper`: `isOneDimensional()` and
`isLDR()`. `ColorGrading` references these values along with other parameters
passed to the builder to determine if we can get away with only generating a
one-dimensional LUT. Meanwhile, `PostProcessManager` takes care of setting the
new spec constants and uniforms for `colorGrading.mat` and
`colorGradingAsSubpass.mat`.
2025-03-19 12:15:35 -07:00
Mathias Agopian
3abddc4584 APIs to query the texture limit sizes.
Assert textures dimensions are in range when creating a Texture object.

FIXES=[398901038]
2025-03-15 16:32:29 -07:00
Powei Feng
e3b7861aa2 webgpu: combine tint static libs into single lib (#8520) 2025-03-13 17:57:25 +00:00
Powei Feng
e12ed900d0 webgpu: fix filamat android build (#8514)
Also fix a change in backend API.
2025-03-12 19:05:28 +00:00
Sungun Park
0bcb45613e Release Filament 1.58.0 2025-03-10 22:11:59 +00:00
Doris Wu
d9e30460dc Enable fgviewer for android remote debugging (#8483)
* Enable fgviewer for the users

* Fix incorrect position

* Update

* Support remote debug server

* Enable fgviewer on android

* Link and include fgviewer_resources

* Adjust js to show untitled view
2025-03-06 05:36:41 +00:00
Powei Feng
bd3a0d5377 Release Filament 1.57.2 2025-03-05 14:37:22 -08:00
Syed Idris Shah
14e3ae51c1 Update android build to use webgpu 2025-03-04 22:09:19 -05:00