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
- 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.
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.
* 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
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`
* 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
* 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
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`.
* 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