Commit Graph
2284 Commits
Author SHA1 Message Date
Philip Rideout c681cd243a gltfio: Introduce the asynchronous API and use it.
We were already using jobs for decoding PNG and JPEG files, but we were
doing a join. This add three methods to ResourceLoader that allow
clients to amortize the decoding process across multiple frames, even on
single-threaded platforms like WebGL.

This PR adds async loading to the following demos:
- samples/gltf_viewer (now shows a progress bar in the UI)
- android/sample-gltf-viewer
- web/samples/helmet.html

Fixes #1876.
2020-01-31 09:20:48 -08:00
Romain Guy 503e66790b Docs fixup 2020-01-30 17:52:39 -08:00
Romain Guy a8dc91c238 Update static version of Materials.md.html 2020-01-30 17:46:46 -08:00
Romain Guy bc554f77f4 Add documentation for refractive materials 2020-01-30 17:43:21 -08:00
brian.wang dada7332c6 fixed compile error by vs2019 (#2087) 2020-01-30 16:50:23 -08:00
Philip Rideout 02b1d0a950 Add validation to VertexBuffer::build()
Clients should be prevented from allocating unused buffer slots because
uploading to an unused slot triggers undefined behavior in the backend.

Motivated by #2042
2020-01-30 15:25:18 -08:00
Pixelflinger bcde742bbc Revert "wip: rework filtering"
This reverts commit 79a83e8c46.
2020-01-30 11:37:41 -08:00
Mathias Agopian 79a83e8c46 wip: rework filtering 2020-01-30 11:33:06 -08:00
Mathias Agopian 3d56ff3547 Process SSR buffer in 11.11.10 format
This will help reducing bandwidth requirements while not affecting
quality significantly.
2020-01-30 11:33:06 -08:00
Mathias Agopian 218c3af11b Fix documentation about Camera's field-of-view. 2020-01-30 11:32:46 -08:00
Philip Rideout ad20a312d6 gltfio: refactor to prep for async API.
This adds most of the asynchronous functionality but does not expose it.
2020-01-30 08:53:01 -08:00
Benjamin Doherty ad788d6338 Fix some warnings 2020-01-29 13:33:02 -08:00
Benjamin Doherty 02b2b79060 Fix iOS samples 2020-01-29 13:32:45 -08:00
Mathias Agopian 610dca88a3 Remove everything related to the depth-prepass
depth-preass is no longer supported.
2020-01-29 13:32:45 -08:00
Romain Guy 00a6a68b9c Update Gradle plugin 2020-01-29 11:52:20 -08:00
Ben Doherty 7852fd2ffb Build iOS samples during CI jobs (#2076) 2020-01-29 10:59:19 -08:00
Mathias Agopian ead4b1d222 Stabilize the blur with an invertible tone-mapping
This helps if some refracted objects have very strong highlights.
2020-01-29 10:17:08 -08:00
Mathias Agopian f290742f1b Screen-space refraction
With this PR screen-space refraction is functional.

Caveats:

The blur passes for supporting rough refractive materials is quite
heavy and increases with the resolution.

SSR uses a gaussian approximation for the brdf and therefore doesn’t
match perfectly cubemap-based refraction and IBL.

The use of MSAA with screen-space effects, while working, is going
to incur a large cost, especially on tilers.
2020-01-29 10:17:08 -08:00
Mathias Agopian b31f267467 Get one step closer to have screen-space refraction
In this PR we look for object rendered with refraction
(which currently never happens), and split the command buffer into
two passes in that case.
2020-01-29 10:17:08 -08:00
Mathias Agopian 47db11a205 Added a post-process resolve() and blit() utility pass
- resolve can be used when resolving a multi-sample color
  buffer is needed

- quadBlit() can be used to blit a texture using a quad.
2020-01-29 10:17:08 -08:00
Mathias Agopian b263a89b07 Use SFINAE for Material::setParameter
This gives us a compile time error instead of link-time error, when
using a parameter type not supported. The code is also a bit more
self-documenting.
2020-01-29 10:17:08 -08:00
Mathias Agopian dbe01d76a2 Minor shader improvement to the bilateral blur 2020-01-29 10:17:08 -08:00
Romain Guy aa3b0a4e16 Add --single to only edit the first renderable 2020-01-28 17:12:20 -08:00
Philip Rideout ff66e980eb Add ResourceLoader::hasResourceData. 2020-01-28 14:51:02 -08:00
Philip Rideout 6fbf8a8be0 Fix event pumping with non-owned platforms.
Tested with WebGL and macOS.
2020-01-28 13:39:58 -08:00
Philip Rideout 1452ce62f4 Remove srcDirs hack, use packagingOptions / exclude. 2020-01-28 12:31:14 -08:00
Philip Rideout d84d095c97 The Android support libs now use dynamic linking.
In my first attempt I kept the multiple project-level dependencies in
each sample's `build.gradle` but that resulted in a gradle error
concerning multiple copies of the same SO file. To work around this
we now append to "srcDirs" to bring in Java dependencies rather than
using project-level dependencies.

The new APK contents are now much more reasonably sized:

    libfilament-jni.so         981 KB
    libgltfio-jni.so           817 KB
    libfilament-utils-jni.so    96 KB

Previously this was:

    libfilament-utils-jni.so    1.8 MB
    libgltfio-jni.so            1.8 MB (unused)
    libfilament-jni.so          1 MB (unused)

Fixes #2070
2020-01-28 12:31:14 -08:00
Philip Rideout e1b498f82c Repair iOS error due to STBI_NO_STDIO.
Fixes #2072.
2020-01-28 12:26:31 -08:00
Benjamin Doherty 06726fe361 Regenerate Xcode project for hello-ar iOS sample 2020-01-28 11:09:34 -08:00
Ben Doherty ba3a274357 Fix headers in iOS samples (#2074) 2020-01-28 10:56:28 -08:00
Romain Guy 30a3d31a3d Update README 2020-01-27 13:46:56 -08:00
Romain Guy 191c89c3b1 Exclude .kt files from javadocs 2020-01-27 13:46:25 -08:00
Romain Guy 42b739154e Update Maven library version 2020-01-27 13:30:34 -08:00
Philip Rideout 721a251b34 Bump package.json to 1.4.5 2020-01-27 13:02:19 -08:00
Ben Doherty 1a66f85b67 Update RELEASE_NOTES for 1.4.5 v1.4.5 2020-01-27 12:59:35 -08:00
Romain Guy 3bba92f813 Fix build message 2020-01-27 12:03:56 -08:00
Philip Rideout 93c9674e2a Fix WebGL build. 2020-01-27 11:37:17 -08:00
John Davis a4b879227d fix case sensitivity problem for linux 2020-01-26 19:17:57 -08:00
Philip Rideout 485dfa6cde Fix typo. 2020-01-24 20:51:31 -08:00
Mathias Agopian 3105a8330e remove unneeded includes in public headers
Replace with forward declarations if needed and includes in .cpp that
now need them.
The idea here is to have our headers have the least amount of impact as
possible on our clients (e.g. compilation time).
2020-01-24 12:13:48 -08:00
Mathias Agopian 88e8661bf3 New API to import textures into filament
If you need this, you know who you are.
The new Texture::Builder::import() allows to specify a OpenGLES texture
id from a shared GL context, effectively importing the texture into
filament.
The texture is NOT destroyed when calling Engine::destroy(Texture*), only
its filament handle.
2020-01-24 12:13:20 -08:00
Mathias Agopian 3a9629d93c Fix a NOOP backend threading bug (#2064)
The NOOP backend didn’t call user-API callbacks from the main thread
(instead calling them from the “backend thread”). This caused problems
with unit tests for instance.
2020-01-23 14:55:25 -10:00
Mathias Agopian 29c14b1053 Fix typo in documentation (#2065)
lastest -> latest
2020-01-23 14:55:09 -10:00
Philip Rideout bd5aeb6b69 Allow non-WebGL builds to disable threads. 2020-01-23 11:06:17 -08:00
Philip Rideout 3674361f20 ModelViewer now automatically detaches. 2020-01-23 09:55:51 -08:00
Philip Rideout 4a29456a7a ModelViewer now works with TextureView. 2020-01-23 09:55:51 -08:00
Philip Rideout 3179a83cfb Android: introduce ModelViewer helper.
This reduces the LOC of our gltf-viewer app from 260 to 146. This could
have been more, but I feel this provides good balance between
flexibility and convenience.

The raw gltfio API involves multiple objects (FilamentAsset,
AssetLoader, ResourceLoader) whereas the ModelViewer has a simple facade
consisting of two methods, one for GLB and one for GLTF. The underlying
gltfio objects are available via non-settable properties.
2020-01-23 09:55:51 -08:00
Ben Doherty 5fe1fe73c4 Use Objective-C availability tests for Metal backend (#2046) 2020-01-23 09:16:19 -08:00
Philip Rideout 5025d8eb6e Remove usage of the invariant keyword. 2020-01-21 14:42:58 -08:00
Philip Rideout 71697b59a3 Disable depth prepass everywhere.
Fixes #737 and #1472. See also #475 and #1295.
2020-01-21 14:42:58 -08:00