Commit Graph

2166 Commits

Author SHA1 Message Date
Tim Psiaki
b030f67eb7 Make EntityManager and Panic dynamic-linkable. 2020-01-06 10:24:17 -08:00
Romain Guy
8380a87a6e Update HTML docs 2020-01-05 11:44:45 -08:00
Philip Rideout
06b9bb0c34 gltfio: honor node labels if they exist.
In glTF, multiple nodes can refer to the same mesh, and each node can be
assigned a unqiue string label. Previously we used NameComponentManager
to annotate entities with mesh labels rather than node labels. This was
wrong because Filament entities are 1:1 with nodes, not meshes.

We still fall back to mesh labels when node labels are not provided.
2020-01-03 10:13:59 -08:00
Philip Rideout
17893ecefd Repair Android extension pointers.
Fixes #1989 by fetching extension function pointers that were refactored
in #1977. Moved string-splitting utility to a common location so that
the base class and concrete classes can both use it.
2020-01-03 07:16:56 -08:00
Ben Doherty
efc1b01901 Respect colorWrite in Metal backend (#1996) 2020-01-02 13:36:59 -07:00
Ben Doherty
88fa93f1de Add support for ASTC textures on iOS / Metal (#1992) 2020-01-02 11:35:23 -07:00
Ben Doherty
36385a2432 Improve Metal textures (#1991) 2019-12-30 11:15:04 -07:00
brian.wang
1e05327c5d Fix compile error for VS 2019 16.4.2 with Vulkan (#1990) 2019-12-27 10:44:24 -07:00
Philip Rideout
0b7a08a2d8 Repair web samples by fixing typo in previous fix. 2019-12-18 18:06:21 -08:00
Philip Rideout
237e0ee367 Revert "Revert "gltfio: enable specular AO to "fix" #1870""
This reverts commit f9230856af.
2019-12-18 13:56:13 -08:00
Philip Rideout
f9230856af Revert "gltfio: enable specular AO to "fix" #1870"
This reverts commit 9bf9c3a439.
2019-12-18 13:17:52 -08:00
Philip Rideout
9bf9c3a439 gltfio: enable specular AO to "fix" #1870 2019-12-18 13:07:05 -08:00
Philip Rideout
25c4efd2db cmgen: do not create useless folder for KTX files
With KTX, we should simply create the specified output folder and put
the KTX file(s) in there. There is no need to create a subfolder of the
output folder.

This change also allows users to pick a custom name for their KTX file,
because we only use the "deployment" name when generating filenames.
2019-12-18 13:03:02 -08:00
Ben Doherty
8f6f0ef511 Add continuous build artifacts (#1978) 2019-12-16 10:38:57 -08:00
Pixelflinger
a924fbb490 Better roughness remapping for IBLs
This greatly improves the quality of semi-rough
materials.
2019-12-14 16:36:58 -08:00
Philip Rideout
4c01dfc9fd macOS: fix flash of red upon resize.
Previous to this change, we suffered from a flash-of-red followed by a
flash-with-wrong-projection every time we resized an OpenGL window.

SDL throttles the window resize events, so FilamentApp updates the View
only on the final low-level resize event. However we were calling
Cocoa's update method on every low-level resize event. Thus we were
showing uninitialized content during the resize.

FilamentApp recreates the SwapChain after the final resize event; one
reason for this is the fact that Vulkan swap chains must be recreated.

The fix is to defer the Cocoa update until the swap chain gets
recreated. This is the perfect time because FilamentApp has already set
the new Viewport at this point.
2019-12-14 09:29:35 -08:00
Mathias Agopian
5ee15239fd Split Android specific code out of PlatformEGL (#1977)
We now should be able to use PlatformEGL for all generic EGL platforms
(not tested though). Most texture streaming operations are not supported
in that case, since they're platform specific.
2019-12-13 14:23:19 -08:00
Philip Rideout
69d36b0226 WebGL: fix usage of direction estimator. 2019-12-13 12:46:11 -08:00
Philip Rideout
87db1aaa57 WebGL: remove old broken test. 2019-12-13 12:46:11 -08:00
Philip Rideout
5e096de534 Disable rounding FBO sizes on WebGL. 2019-12-13 12:46:11 -08:00
Philip Rideout
97d53bf7e9 Remove warnings about deadlock. 2019-12-13 10:25:38 -08:00
Philip Rideout
6fbc690097 macOS: pump the event queue while waiting. 2019-12-13 10:25:38 -08:00
Jordan Rupprecht
311f6eacd7 Add missing <assert.h> include. (#1969)
An version of clang is smarter about generating warnings for template code. `assert` here is not included, so clang generates: `error: use of undeclared identifier 'assert'`
2019-12-13 09:26:02 -08:00
Ben Doherty
0dee8c5f34 Deprecate Kokoro-specific logic from build scripts (#1973) 2019-12-12 13:23:43 -08:00
Philip Rideout
ddf85bae72 CMake: add a convenient "run" target for quick testing.
This is just a shortcut for building gltf_viewer, then immediately
running it, which is something we do a lot.
2019-12-12 13:12:23 -08:00
Pixelflinger
695d61f87c fix CubemapUtils::processSingleThreaded()
the state wasn't initialized from the user given prototype
2019-12-11 15:26:12 -08:00
Philip Rideout
9584371f89 macOS: add a check for "is this the right view?" 2019-12-11 14:49:23 -08:00
Philip Rideout
509bfb5b5e Add warnings (hopefully temporary) about macOS deadlock. 2019-12-11 14:49:23 -08:00
Philip Rideout
f853b7dc40 macOS: add cleanup for observer. 2019-12-11 14:49:23 -08:00
Philip Rideout
0693a97577 macOS: fix window resizing regression. 2019-12-11 14:49:23 -08:00
Romain Guy
8e00df1de5 Add Color::absorptionAtDistance() to compute absorption for refraction. (#1964)
Specifying the transmittance color at a specific distance is more
user-friendly than specifying absorption coefficients directly.
2019-12-10 18:20:23 -08:00
Philip Rideout
28f0536b31 Repair JavaScript bindings for IndirectLight. 2019-12-10 18:19:38 -08:00
Mathias Agopian
639bfbfc9a Fix SSAO when blending is used
When doing the depth path for ssao, we need to remove the blended
objects, i.e. produce a depth path similar to the regular depth prepass.

We also need to clear the SAO buffer. It's not needed for opaque
objects because they are written in the SAO's depth buffer. This fixes
"ship in a bottle" scenario.
2019-12-10 17:53:02 -08:00
Philip Rideout
0c734d6db0 Simplify PlatformCocoaGL. 2019-12-10 17:19:41 -08:00
Philip Rideout
e0f5b5125c Fix Catalina by moving some calls to the UI thread.
Fixes #1839.
2019-12-10 17:19:41 -08:00
Philip Rideout
28065e36e8 Make builds less verbose.
Fixes #1956.
2019-12-10 17:19:06 -08:00
Mathias Agopian
8088f0cd6f fix android samples
these samples broke with the new 5 lods ibls
2019-12-10 16:56:19 -08:00
Mathias Agopian
36cdadd238 fix gltf_viewer calculated light position/intensity 2019-12-10 14:44:23 -08:00
Ben Doherty
1061d5c5fa Fix MSVC 2019 16.4 build (#1943) 2019-12-10 13:34:48 -08:00
Mathias Agopian
c1bd438d89 temporary workaround for build break 2019-12-10 12:26:52 -08:00
Pixelflinger
dd8c0a759f Improve IBL's diffuse
If spherical harmonics are not specified in IndirectLight (i.e. 
omitted entirely), we instead use the roughness==1 LOD in the shader.
This produce much better results with absolute HDR environment, and 
generally works better more often.

This is now the preferred solution.

For cases where spherical harmonicas are better or preferred, they
can simply be supplied as before.
2019-12-10 12:26:52 -08:00
Mathias Agopian
0f16f3177e some cmgen fixes
- support equirect/octahedron save in more cases
- apply 1/pi when rendering SH so it's easier to compare 
  (this is used only for debugging anyways)
2019-12-10 12:26:52 -08:00
Ben Doherty
acc2fd9c94 Add depth32 fallback for GPUs without packed depth support (#1957) 2019-12-10 12:23:17 -08:00
Romain Guy
8feb842717 Ignore metallicness when refracted objects don't specify reflectance
Metals need a complex IOR but we only accept a scalar IOR.
2019-12-10 11:56:00 -08:00
Romain Guy
f19eaaa557 Fix directoy based cubemap loading 2019-12-10 10:03:56 -08:00
Romain Guy
3fa0c2d18b Add refraction to material_sandbox 2019-12-10 09:51:54 -08:00
Mathias Agopian
9393e1369b don't apply roughness remapping for solid refraction
The thin roughness remapping only makes sense for thin surfaces, it was
a mistake to apply it to solids. It assumes that a ray will go
undisturbed though the thin surface with an ior of 1.
2019-12-10 00:02:17 -08:00
Ben Doherty
8342b0ecec Update Windows READMEs for building with VS2019 (#1952) 2019-12-09 17:09:45 -08:00
Ben Doherty
9a291b6543 Refactor Metal buffers, allow in-frame vertex and index updates (#1950) 2019-12-09 15:54:40 -08:00
Romain Guy
ec403f8940 Fix material_sandbox 2019-12-09 13:37:09 -08:00