Commit Graph
437 Commits
Author SHA1 Message Date
Ben Doherty f31eb09ca0 Add Live Wallpaper Android sample (#3161) 2020-10-06 11:03:55 -06:00
Ben Doherty 0bec65701a VSM: render both shadow casters and receivers (#3147) 2020-10-05 17:03:10 -06:00
Ben Doherty 59ef044ce0 Add support to UiHelper for SurfaceHolder (#3155) 2020-10-05 12:04:05 -06:00
Benjamin Doherty d72d3533e6 Bump version to 1.9.3 2020-10-05 11:34:19 -06:00
Pixelflinger 8b3caeffb9 ssct: decouple shadow distance from sample count 2020-10-01 10:20:38 -07:00
Ben Doherty 44d4694c29 Add JNI binding for vsm msaa samples (#3139) 2020-09-30 16:12:45 -06:00
Ben Doherty 229fdc9be5 Add View::setShadowType JNI binding (#3094) 2020-09-30 13:20:39 -06:00
Pixelflinger 583c1c07cf SSCT optimizations and fixes
- Use lower depth LOD as the cone radius increases.
  This is the same technique we use for SAO.
  The better cache access significantly improve performance.
  On a test on Pixel4 at 585MHz, SAO pass improves by 30%.
  This also helps the algorithm scale with the shadow distance.

- Shadow direction/length no longer dependent on aspect-ratio and camera
  orientation.
  This is fixed by doing all the computations in screen-space instead of 
  normalized screen space.

- Shadow parameters are no longer dependent on the field of view.

- Also rename dominantLightShadowing.fs to ssct.fs

- remove zoom parameter, it wasn't very useful.
2020-09-29 17:00:32 -07:00
Philip Rideout 7997e4aa21 Introduce libs/viewer and serializable view settings.
This introduces the `viewer::Settings` struct, and a JSON reader /
writer.

This will be used for automated testing and for client / server
communication.

Note that `viewer::Settings` is closely associated with the
`filament::View` API; when updating the latter we will often need to
update the former, as well as some serialization code. This increases
the maintenance burden and I think we should consider using a parser
library like libclang or a macro-based reflection utility.

This PR also migrates SimpleViewer into libs/viewer and un-inlines its
implementation. It does not belong in gltfio because it has an imgui
dependency.
2020-09-29 10:47:35 -07:00
Pixelflinger 075486724f Add JNI support for SSCT 2020-09-28 10:53:30 -07:00
Pixelflinger 0f2993aec7 Decouple SSAO bilateral filter from quality setting 2020-09-28 10:53:30 -07:00
Benjamin Doherty 42733c10b7 Bump version to 1.9.2 2020-09-28 11:34:32 -06:00
Romain Guy 50e5db4347 Add tasks to manage Sonatype releases (#3127)
* Add tasks to manage Sonatype releases

* Edit comments
2020-09-25 16:07:12 -07:00
Philip Rideout 1ebdb18eae gltfio: add async cancellation API 2020-09-23 10:53:55 -07:00
Pixelflinger c3975f2640 APIs to enable/disable screen space refraction
Just like with shadows, this is a toggle to entirely disable
screen space refraction.

Added missing getters, and minor refactoring.
2020-09-21 16:30:56 -07:00
Benjamin Doherty 35ace36b7d Bump version to 1.9.1 2020-09-21 11:02:11 -06:00
Pixelflinger 73f1ddfebf ssao: reduce creases caused by geometry tessellation
We borrow a page from the HBAO book here and allow to limit the angle
with the horizon of SSAO samples. This can help reducing the effects
of low tessellation, which tend to create unwanted creases with SSAO.
2020-09-20 22:34:34 -07:00
Romain Guy 2708b3d076 Initialize fields to nullptr to avoid crashes
This happens when a Texture with no callback is created.
2020-09-17 09:00:34 -07:00
Pixelflinger 14532a2e69 several fog fixes
- inScatteringSize actually cannot be set to zero because it produces
  a 0^0 in the shader. So with this change, in-scattering must be
  strictly > 0 to enable.

- inScatteringSize on the java side had an incorrect default value of
  zero (which of course, now doesn't matter anymore).

- also clamp the fog altitude to 1mm which simplifies the shader quite
  a bit for the same result.

Fixes #3069
2020-09-16 00:18:49 -07:00
Pixelflinger dc16eb04f8 rename .blurScale to .cocScale in dof options
.blurScale was in fact a scale factor applied to the circle of
confusion (which makes it indeed a "blur scale", but let's use
a more precise language here). 

Update comments to show how to  use .cocScale to control the DoF
effect independently from the camera aperture, which can be useful for
artistic reasons.
2020-09-14 22:22:52 -07:00
Benjamin Doherty 38d37d0d59 Bump version to 1.9.0 2020-09-14 11:07:22 -07:00
daichen 6c25f5e50f CoroutineScope job should be canceled before destory (#3056) 2020-09-08 21:31:26 -07:00
Pixelflinger bb8cd6677d optionally compress highlights before bloom
This avoid unrealistic looking bloom halos from very strong highlights.
This is enabled by default.
2020-09-01 09:46:23 -07:00
Ben Doherty af2fc39bad Add JNI bindings for CSM (#2979)
* Add JNI bindings for CSM

* Fix Windows build

* Fix jovadoc
2020-08-21 10:21:31 -07:00
Pixelflinger 4e3bb9c7c8 fix translucent views with custom render targets
Marking a view with a custom render target will now disable blending
for that view but require an alpha channel for intermediate buffers.
Blending is disabled because it is meaningless.

fixes #2802
2020-08-19 11:55:13 -07:00
Pixelflinger 7852a9b8cb Add public APIs for texture 3D and texture 2D arrays
Also cleanup all setImage() error reporting. All error checks are
changed from silent to NON_FATAL_ASSERT, which means they'll throw
if exceptions are enabled or do a no-op and log a message otherwise.

Also added more precondition checks.
2020-08-12 17:32:46 -07:00
Ben Doherty faa785f3f6 Switch to C++17 (#2940) 2020-08-12 15:21:39 -07:00
Richard Chang 4d51042170 Add back proguard file for Android (#2933)
* Add back proguard file for Android and update README.md

The proguard-rules.pro file provided by Jeff McGlynn (9fe60a636)
works perfectly for Android projects with minifyEnabled.
Add the config file back to the repository and update README.md
to help other Android users setup release build.

* Refine android proguard file and remove proguard section in README.md
2020-08-12 10:08:53 -07:00
Pixelflinger 08e411aeac API CHANGE: make ssao options work like all other options
setAmbientOcclusion (and associates) is now deprecated (but still works),
in favor of the new .enabled field in AmbientOcclusionOptions.
2020-08-10 17:23:03 -07:00
Pixelflinger 8155bf04a8 Implement variance clamping
variance clamping further shrinks the min/max AABB
2020-08-10 11:14:34 -07:00
Pixelflinger 05bfa632ff Add TAA java bindings 2020-08-10 11:14:34 -07:00
Philip Rideout 732a6c08de Add Texture getters to IndirectLight and Skybox.
Fixes #2851.
2020-08-07 11:49:24 -07:00
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