-DFILAMENT_SKIP_SAMPLES=ON with CMake
-Pfilament_skip_samples with gradle
This change also renames CMake options specific to Filament
to avoid clashes with subprojects.
To trigger an exception users could either shrink the window or enlarge
the sidebar. Constraining both of these is somewhat tricky so let's
just clamp the viewport width at a low level.
Note that libgeometry is already included in `filament-android`, this
simply exposes more of its existing functionality.
The Java version of SurfaceOrientation is similar to the JavaScript
version because we are bundling it into the main Filament package, even
though it is a separate library in C++. This is much simpler than
creating a brand new Java package.
New Android sample that tests this is forthcoming.
Fixes#1729.
This feature adds one new method to `FilamentAsset` and uses it in our
Kotlin, JavaScript, and C++ helpers:
utils::Entity popRenderable() noexcept;
This pops a ready renderable off an internal queue, or returns 0 if no
renderables have become ready. It provides a simple way for clients to
gradually add renderables to the scene as they become ready. Previously
clients could only get the entire list of entities, regardless of
whether they had Renderable components or complete textures.
To facilitate this feature, this PR adds a new internal-only class to
gltfio called `DependencyGraph`, which is a temporary object used for
bookkeeping during the asynchronous load.
`DependencyGraph` discovers ready-to-render entities by tracking the
textures that each entity depends on. This is a graph because
renderables connect to a set of material instances, which in turn
connect to a set of parameter names, which in turn connect to a set of
texture objects. These relationships are not easily inspectable using
the Filament API or ECS.
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.
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.
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).
This makes the upcoming Java bindings simpler and improves parity with
existing API conventions.
Note that camutils does not depend on filament and therefore cannot use
BuilderBase.
Note that the Manipulator Builder state is public which breaks with
convention but makes implementation simple and allows C++ clients to
continue using modern initializer syntax if they wish.
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.
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.
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.
Normally the IOR is deduced from the reflectance, but now we allow to
specify the IOR instead or in addition to the reflectance.
In the later case, it's possible to create physically impossible
materials, but this can be useful for artistic reasons.
This removes a lot of code and will make it easier to migrate into a new
library with Java bindings, etc.
- The clipping planes and projection matrix were unused, removed them.
- In split view mode, our demos were using only 2 of the 3 manipulators,
removed one.
- Instead of callbacks and update methods, users can simply ask for the
current matrix at every frame.
- The manipulator's job is to consume mouse events and maintain an
"look at" basis, there is no need to store a reference to a Filament
Camera.
Fix#1165
In order to use transparent views, post-processing had to be disabled
because we were not able to blit post-processed buffers with blending.
This is now fixed by simply reverting to a quad.
A side effect of this, is improved performance when a scaling blit is
needed when MSAA is active.
This also introduced new "bugs", or at least weird behaviors: the
system needs to know when blending is needed, and this has to be
based on heuristics (unless we add a new api). Currently the heuristic
is that the COLOR buffer is not discarded and the view is cleared with
an alpha value (or not cleared).
- we add an 'intensity' parameter that allows to control the strength
of the AO effect. This is useful for aesthetic reasons.
- the default intensity is now 2x that of before this change, which
makes the intensity parameter match AO papers this implementation
is inspired of.
- bias is now z-dependent, which reduces some self shadowing wrt the
depth.