Commit Graph

2207 Commits

Author SHA1 Message Date
tpsiaki
2c591d2dca Correct out-of-order transform instances (#2025)
The current code only updates the order in the transaction commit if there's a single out-of-order node in the scene graph, but if multiple are out of order (or one swap doesn't fully fix the ordering), then we end up with out of order scenes, and incorrect world transforms.

Additionally, when nodes are reparented outside of a transaction, the order is not updated.
2020-01-13 13:22:49 -08:00
Mathias Agopian
4673545f45 Fix a multisample related bug in the FrameGraph
The FrameGraph would erroneously specify a sample count on textures
that are sampleable and used as an attachment to a multisampled 
target -- however, that's not allowed.

We didn't run into issues, because had a workaround for this when
creating the texture. This is augmented by an assertion.
2020-01-13 11:29:14 -08:00
Mathias Agopian
4703a45ff5 Ensure we don't use RTTI when not available
also don't implement the graphviz export in release builds.
2020-01-13 11:28:50 -08:00
Mathias Agopian
35aabd5e44 Fix a couple minor issues in the OpenGLES backend
- we were not unbinding the renderbuffer int the right place,
  when it's created, instead we were doing that when using it the 
  first time. Unbinding soon makes sense because we never need to
  rebind it after that.

- in debug builds we were clearing render targets at creation time,
  but this was wrong because a render target won't necessarily be written
  (it could be used as the source of the blit for instance).
  This didn't cause any trouble in the framegraph, by chance, it was smart
  enough to reuse existing render targets in the case of blitting.
  Ideally we'd clear textures/renderbuffer at creation time,
2020-01-13 11:28:50 -08:00
Mathias Agopian
118944be9a Improve/simplify OpenGLDriver a bit
merge frameBufferRenderbuffer() and framebufferTexture() because
the filament API doesn't have a distinction. This actually removes
quite a bit of code too.
2020-01-13 11:28:50 -08:00
Mathias Agopian
8e1ecbb0ea Minor FrameGraph improvements
- write() is marked as [[nodiscard]] since it's
  generally an error to discard it

- graphviz export not display wether a texture resource is
an actual texture or renderbuffer
2020-01-13 11:28:50 -08:00
Romain Guy
00ba8c09f8 Rewrite Maven publish tasks to support multiple flavors (#2022)
* Rewrite Maven publish tasks to support multiple flavors

* Don't build filamat with an unused CMake option

* Don't compiler debug in release mode

* ... for real

* Link to BUILDING.md
2020-01-10 18:02:46 -08:00
Philip Rideout
15b071acaa gltfio: support external resources on Android.
This was untested because our only glTF Android sample uses glb instead
of JSON. We will soon be adding a new Android demo that uses an actual
gltf file.

This fixes #1841.
2020-01-10 09:15:38 -08:00
Romain Guy
aa3dfb9a4b Revert "Disable filamat-android's flavors for now"
This reverts commit 95e22d878a.
2020-01-09 19:17:50 -08:00
Romain Guy
95e22d878a Disable filamat-android's flavors for now 2020-01-09 17:49:30 -08:00
Philip Rideout
4f8c495563 Another gltf_bloom fixup. 2020-01-09 14:31:43 -08:00
Romain Guy
1d6ea1db0f Update README.md 2020-01-09 14:23:41 -08:00
Romain Guy
393cc5c634 Update README 2020-01-09 14:23:05 -08:00
Philip Rideout
34c2772a60 Remove unused source file. 2020-01-09 14:10:33 -08:00
Philip Rideout
4d258ab5e8 Remove a build output file. 2020-01-09 14:07:20 -08:00
Philip Rideout
a306f9074a Clean up gltf-bloom to prep for new gltf-viewer app.
This renames the app namespace and removes the unused Io file.
2020-01-09 13:49:24 -08:00
Philip Rideout
6e30566363 Bump version number in package.json 2020-01-09 12:33:17 -08:00
Romain Guy
2908224c95 Filament 1.4.4 v1.4.4 2020-01-09 12:19:05 -08:00
Romain Guy
e011853e7e Update androidx.annotation to 1.1.0 2020-01-09 08:55:43 -08:00
Romain Guy
104105c937 Fix the build 2020-01-08 18:01:18 -08:00
Romain Guy
3fa98419a6 Add more .gitignore 2020-01-08 17:59:49 -08:00
Romain Guy
44d08ce41e Fixup javadocs 2020-01-08 17:55:17 -08:00
Mathias Agopian
0a1c1be00e Refactoring to allow rendering multi-pass rendering
specifically into the same render target.
2020-01-08 16:10:09 -08:00
Mathias Agopian
7efd7abffe Don't combine clearFlags when retrieving a rendertarget
Instead we use the clear flags that the user specified. This is needed
in the case where we're rendering in the target in two passes, the
first pass might want to clear the buffers, while the 2nd one will not.
If we were combining the clear flags, the first pass's flags would be
sticky and the view would always be cleared.

If combining is needed it must be specified by the user.
2020-01-08 16:10:09 -08:00
Mathias Agopian
e27158507e refactor Renderer to make it more flexible
This is in preparation to supporting screen-space effects.
There are two major changes:

- RenderPass is now copiable and intended to be passed by copy to
  the execute stage of frame graph passes

- The color pass is in its own function now


This actually simplify RenderPass api.
2020-01-08 16:10:09 -08:00
Romain Guy
d9ee2fa10d Use a proper Gradle plugin to generate Filament assets in samples (#2018) 2020-01-08 15:45:44 -08:00
Mathias Agopian
b30a7aa5a2 Make ResourceAllocator mockable and update test
We have one very important unit test that is supposed to make sure
the framegraph reuses the same rendertarget between 2 passes, this
unit test would always succeed when using the NoopDriver.
Now that we can mock the ResourceAllocator, we can ensure this unit
test is doing its job.
2020-01-08 15:39:40 -08:00
Mathias Agopian
34c1aaac18 improve cmgen prefiltered cubemaps
Rotate the sample pattern at every light direction, which trades
aliasing for noise (which is arguably more pleasant) for IBLs with
very high frequency (i.e. high level of HDR-ness).
2020-01-08 15:39:21 -08:00
Ben Doherty
8dbb4c6b7e Add new heightfield sample (#2004) 2020-01-08 11:55:28 -08:00
Romain Guy
f5d5afba74 Re-organize Android Gradle files (#2013)
* Re-organize Android Gradle files

Clean up our Gradle files, share versioning, etc. and prepare for
publication to sonatype.

* Use androix annotations for desktop

* Add samples as subprojects to root Gradle

* Fix build script

* Don't break when samples aren't compiled

* Better organize the Android Studio project
2020-01-07 18:37:45 -08:00
Philip Rideout
e09f0bb99f Repair gradle IBL path for gltf_bloom.
I broke this when I changed the cmgen KTX behavior.
2020-01-07 14:05:40 -08:00
Mathias Agopian
fddf51dc74 cmgen -d would force importance sampling mips generation 2020-01-06 17:43:11 -08:00
Mathias Agopian
b8d4b981e0 Better roughness remapping and comments
We were conflating two concepts in our comments about the roughness
remapping, which was confusing. Also changed the remapping so it 
matches a log2 mapping in our default configuration.
2020-01-06 17:42:56 -08:00
Daniel Lehmann
892302442f Fix Backend enum in Java to be consistent with C definition (#2006)
The C definition was changed to include METAL, moving NOOP further down.
The Java definition never caught up, making NOOP mean METAL and making the
real NOOP unreachable.

This patch puts them back in sync. Also, updated the Java comments to match
the comments from the C definition.
2020-01-06 16:27:15 -08:00
Philip Rideout
39046ddfe1 camutils: fix MSVC error. 2020-01-06 16:12:05 -08:00
Philip Rideout
ac14074bc4 camutils: flip zoom to match old manipulator. 2020-01-06 16:12:05 -08:00
Philip Rideout
7d548151d7 Introduce camutils library.
This moves the camera manipulator into its own library and adds new
functionality including a new "Google Maps" manipulator and a bookmark
feature to facilitate camera animation.

Java bindings and an Android sample will land later this week.
2020-01-06 16:12:05 -08:00
Philip Rideout
898ed70aa0 Remove <iostream> from math headers.
This speeds up our build time by using <iosfwd> and un-inlining the
vector print functions.
2020-01-06 15:09:06 -08:00
Romain Guy
78842b59c9 Only build FBX and OBJ importers (#2003) 2020-01-06 14:38:32 -08:00
Ben Doherty
f4f4f9ccd5 Implement flush for Metal backend (#1999) 2020-01-06 12:28:11 -08:00
Mathias Agopian
2ef9d72dbd Simply refraction code
This makes it easier to add new shapes and experiment.
Added a "sold box" shape that is not used yet.
2020-01-06 11:33:06 -08:00
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