Commit Graph

405 Commits

Author SHA1 Message Date
Philip Rideout
dc74ee2ddc Refactor CallbackUtils. 2020-08-05 17:27:12 -07:00
Philip Rideout
2727cddd7a TextureHelper: add overload with a release callback.
Fixes #2909.
2020-08-05 17:27:12 -07:00
Romain Guy
642fb5859b Filament 1.8.1 2020-07-30 12:18:38 -07:00
Philip Rideout
b4623c9afc Add lightroom IBL, enable ColorGrading by default in gltf_viewer.
The non-legacy ACES is now default, it looks much better.

I also tested this IBL with WebGL and Android.
2020-07-30 11:39:36 -07:00
Philip Rideout
2f4dd0bbd4 sample-page-curl: add comments to variables, etc. 2020-07-27 07:35:58 -07:00
Romain Guy
6ed1fb3b7b Add quality option to ColorGrading (#2858)
* Add quality option to ColorGrading

Low: 16x16x16 LUT in 10 bit
Medium: 32x32x32 LUT in 10 bit
High: 32x32x32 LUT in 16 bit
Ultra: 64x64x64 LUT in 16 bit

* Move comment
2020-07-23 13:49:01 -07:00
Romain Guy
1613c1bb0e Ensure we respect the desired size on layout change (#2859) 2020-07-23 12:45:02 -07:00
Richard Chang
1162ae4ddc Fix typo in SurfaceOrientation jni wrapper (#2853) 2020-07-23 09:06:26 -07:00
Pixelflinger
ec9fd58fc0 use more inclusive language 2020-07-22 15:20:54 -07:00
Ben Doherty
b786b486b6 Add getCullingProjectionMatrix JNI method (#2847) 2020-07-22 15:12:03 -07:00
Philip Rideout
0da20cccdc Introduce removeEntities API / fix leak in ModelViewer (!)
For testing purposes, sample-gltf-viewer reloads the model when the
user double-taps the screen. This operation was causing a buildup of
blank entities in the Scene, because we were merely destroying the
components, not removing them from the Scene.
2020-07-22 13:38:38 -07:00
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