- Allow JavaScript and Java / Kotlin clients to configure this setting.
- Opt in by default (this was disabled in #2621)
- Optimize large assets like Bistro by iterating through prims only when
the asset actually has skins.
Fixes#2714.
When invoking MaterialBuilder.samplerParameter with Java enum SAMPLER_EXTERNAL it was wrongly recast as native enum SAMPLE_CUBEMAP in the JNI interface because the Java enum was missing SAMPLE_2D_ARRAY.
Tested in Android Studio by starting sample-gltf-viewer and typing the
following into the debugger:
modelViewer.asset!!.getFirstEntityByName("Drone_Body")
modelViewer.asset!!.getEntitiesByName("Drone_Body")
modelViewer.asset!!.getEntitiesByPrefix("Drone")
glTF assets are required to provide min/max attributes for POSITION,
so in theory we never need to compute the AABB. However the option is
still there.
This PR also makes it so that Java clients can choose this option,
previously it was hardcoded for all non-native clients.
* Introduce ColorGrading API
A ColorGrading object will eventually be settable on a View to
choose the tone mapping and other color transformations.
There is currently only a single default ColorGrading instance
used by all views.
* Use raw function pointers
Since AO is computed at 1/4 resolution, it is necessary to upsample
the AO buffer. Until now this was done with a bilinear tap, which is
less than ideal as it can creates jaggies at edges.
High quality upsampling can now be enabled and uses a bilateral filter.
The cost is about 2.0 ms at 250MHz on Pixel 4. ES3.1 is required.
until now we allowed any resolution for SSAO, but it didn't make
much sense, especially that the depth pass is now used for other things.
To keep things more manageable, we only allow 0.5 and 1.0 scale
factor settings (respectively quarter and full resolution).
The presence of a special Gradle property is now used to exclude Vulkan
support from the build. By making Vulkan "always on" for local
development, we can avoid stale CMake cache issues that arise from
toggling the Gradle property. It also lets you avoid adding the flag
to Android Studio preferences.
This is motivated by testing and does not indicate production readiness.
Clients still need to pass VULKAN into the Engine constructor to select
the Vulkan backend.
To keep APK size down and keep CI fast, we are continuing to exclude
Vulkan from official Android builds.
After syncing this change, you might need to use `./build.sh -c` to
clobber various build caches.
This removes (rather than deprecates) all public constructors that
take a native pointer without an accompanying Engine.
Most notably, MaterialInstance had a public pointer constructor which
is now package private. This means that FilamentAsset needs an Engine,
so it now takes the one from AssetLoader.