Commit Graph
394 Commits
Author SHA1 Message Date
Romain Guy c6d9d4a9ae Update AGP, NDK and androidx.core (#2826) 2020-07-17 09:24:33 -07:00
Romain Guy 4c81bb0158 Fix material parameters enum (#2814)
* Fix material parameters enum

Fixes bug #2812

* Add  missing sampler type to filamat
2020-07-14 09:29:20 -07:00
Philip Rideout ec533e6047 DriverEnums: add usage flag for SUBPASS_INPUT 2020-07-11 09:22:28 -07:00
Romain Guy b224916f09 Prevent crash if the glTF doesn't have animations 2020-07-09 17:23:06 -07:00
Philip Rideout 5d2b12b9a6 Fix javadoc syntax error. 2020-07-09 12:12:41 -07:00
Romain Guy 77aec40a56 Prepare Filament v.1.8.0 (#2787) 2020-07-09 11:44:15 -07:00
Ben Doherty a6872c840c Silence more deprecation warnings (#2750) 2020-06-30 10:14:57 -07:00
Romain Guy 2aeb33b260 Fix Windows build 2020-06-26 23:20:23 -07:00
Romain Guy 132e94b3bb Add vignette post-processing effect (#2743)
* Add a vignette post-processing effect

* Use numeric limits instead of hard coded values
2020-06-26 17:44:17 -07:00
Philip Rideout 8f7b25088d CMake: build matdbg / civetweb only when enabled.
Also group FILAMENT_ENABLE_MATDBG with all our other CMake options.
2020-06-23 15:19:04 -07:00
Philip Rideout 8f4ffbc782 gltfio: various improvements to skinning normalization.
- 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.
2020-06-23 13:30:45 -07:00
Philip Rideout a79effc78b Page Curl: fix CPU animation. 2020-06-18 19:38:41 -07:00
Philip Rideout 66471ee990 Page Curl: add configurable curl style. 2020-06-18 19:35:42 -07:00
Ben Doherty 94776a01b3 Add JNI bindings for gltfio camera (#2693) 2020-06-16 15:24:24 -07:00
Ben Doherty 7a1c079050 Use an int, not byte, for variantFilter (#2691) 2020-06-15 11:38:43 -07:00
Philip Rideout ebd195f8e4 matdbg: Add support for Android.
See the matdbg README for details.
2020-06-14 22:42:55 -07:00
Philip Rideout 899ac1224f gltfio: Add Java bindings for desktop.
This is completely untested.

Fixes #2670.
2020-06-12 13:47:54 -07:00
Philip Rideout fa0f5e0501 Prep the build for multi-platform matdbg. 2020-06-10 20:00:24 -07:00
Rupert Rawnsley b0acb3216a eglInitialize requires a non-null IntArray reference and different offsets for major and minor. (#2668) 2020-06-10 08:52:20 -07:00
Philip Rideout f125e1730d Throw Java exception when using destroyed Animator.
Someone wise once said: "It is better to throw in Java than to crash in
Native."

Motivated by #2654.
2020-06-09 10:36:35 -07:00
Rupert Rawnsley 18776fc432 SamplerType JNI definition was out of step with the native definition. (#2658)
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.
2020-06-09 08:35:33 -07:00
Romain Guy 4bf21876b4 Add new color grading feature, vibrance (#2656)
* Add new color grading feature, vibrance

* Address code review comment
2020-06-09 08:34:10 -07:00
Romain Guy b4d2a1991a Add new curves color grading tool (#2651)
* Add new curves color grading tool

* Add release notes
2020-06-08 12:17:53 -07:00
Philip Rideout 43f7bad8a3 Kotlin cleanup 2020-06-05 08:23:25 -07:00
Romain Guy 2fcca9677d Add Ushimura tone mapping operator
Also fix potential negative values when applying white balance
during color grading.
2020-06-04 15:17:08 -07:00
Romain Guy 1935598a7d Add Java bindings for ColorGrading (#2638) 2020-06-04 11:03:15 -07:00
Philip Rideout b281022eb0 sample-page-curl: flip the backface image. 2020-06-03 12:07:43 -07:00
Philip Rideout 7418fc0222 gltfio: JNI bindings for get-by-name.
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")
2020-06-02 18:38:36 -07:00
Philip Rideout 9437907eb4 ModelViewer now uses a coroutine. 2020-06-02 18:36:49 -07:00
Philip Rideout 91a009f94c Add new async method to ModelViewer.
If you now try loading Bistro, the skybox shows up fairly quickly.
This works by moving AssetManager uncompression off the UI thread.
2020-06-02 18:36:49 -07:00
Philip Rideout 6c173489d7 gltfio: Add get-by-name and get-by-prefix methods.
Java bindings will be forthcoming in a separate commit.
2020-06-02 10:17:12 -07:00
Philip Rideout 28912b6f57 filamat-android: fix string leaks 2020-06-02 10:16:41 -07:00
Philip Rideout a3e336921e gltfio: improve performance by assuming assets are well-formed.
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.
2020-06-01 10:30:09 -07:00
Romain Guy b77e024de9 Introduce ColorGrading API (#2613)
* 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
2020-05-29 18:54:48 -07:00
Philip Rideout 81ea280ea9 gltfio: add Java bindings for instancing. 2020-05-29 09:22:17 -07:00
Romain Guy 1f29df6da4 Add a note about AGP 4.0.0 2020-05-28 14:05:20 -07:00
Philip Rideout c087eb6825 gltfio: Add Java / JavaScript bindings for lights. 2020-05-28 11:51:35 -07:00
Jaime Blasco 5104318fff Initialize DisplayHelper when using textureView in ModelViewer (#2598) 2020-05-27 10:10:13 -07:00
Pixelflinger 62ff7b7d0a Improve AO buffer upsampling
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.
2020-05-26 12:59:47 -07:00
Pixelflinger d62f664957 ssao: restrict the scaling to 0.5 and 1.0
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).
2020-05-26 12:59:47 -07:00
Philip Rideout dc51dc197c Gradle: update old property name.
I forgot to update this in 0b1fa7f.
2020-05-22 23:28:30 -07:00
Romain Guy e9d1e3a82e Stop using deprecated APIs for incremental builds (#2574) 2020-05-21 22:15:55 -07:00
Philip Rideout cdd099951a sample-page-curl: add rigidity parameter. 2020-05-19 16:48:55 -07:00
Philip Rideout 432ed50cb3 sample-page-curl: use inverseTonemap() etc. 2020-05-19 16:48:55 -07:00
Philip Rideout 5f34b8974f Fix buffer size bug in sample-page-curl. 2020-05-18 14:34:46 -07:00
Philip Rideout 0b1fa7fc80 Enable Vulkan for Android by default.
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.
2020-05-18 09:34:55 -07:00
Ben Doherty 8780d7aae5 Bump version to 1.7.0 (#2541) 2020-05-15 10:41:51 -07:00
Philip Rideout 0a9236c2eb Make JNI constructors private unless they take Engine.
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.
2020-05-12 15:41:19 -07:00
Philip Rideout 0a61faa57a KtxLoader should pass Engine to Texture constructor. 2020-05-12 10:57:21 -07:00
Philip Rideout 26520c8d23 filament-utils: Improve ModelViewer flexibility. 2020-05-12 10:57:21 -07:00