Commit Graph

1037 Commits

Author SHA1 Message Date
Mathias Agopian
61c4df9503 fix uninitialized variable on ES2 devices
On ES2 devices (or in forceES2 mode), we emulate the sRGB swapchain
in the shader if the h/w doesn't support it. In that case, the emulation
is controlled by a uniform that technically lives in the frameUniforms
block. However, the frameUniforms buffer is not updated, instead,
the uniform is manually set. Unfortunately, the UBO emulation
overrides it with the uninitialized variable.

BUGS=[377913730]
2024-11-11 16:30:24 -08:00
Benjamin Doherty
483ef2f125 Release Filament 1.56.0 2024-11-06 10:48:24 -08:00
Mathias Agopian
b8551e50e1 a new Feature Flag API
Feature flags are intended to be used when a new feature is added to 
filament and have generally two purposes:

1) during feature development, the feature can be implemented but
   disabled which can help developing large features. This way the
   feature can be tested by stakeholders while it's being developed
   without impacting other clients.

2) once a feature is ready, its flag can be enabled by default, but 
   in case the feature breaks something or has unintended consequence,
   clients have the option to turn it off.

Feature flags are intended to have a relatively short life span, i.e.
once a feature is stable, the flag fill be removed.

There two types of feature flags. Constant feature flags can only be
set during Engine initialization via Engine::Builder. Non-constant
feature flags can be set at any time. 

Feature flags SHOULD NOT be used as configuration or settings.


Feature flags are designed with a few ideas in mind:
- they are very cheap to check inside the engine
- non-constant flags can easily be toggled using ImGUI
2024-11-05 15:34:56 -08:00
Benjamin Doherty
7f92dfd06c Release Filament 1.55.1 2024-11-04 09:34:01 -08:00
Mathias Agopian
a6b4c9fae1 fix gltf_viewer android sample build 2024-10-25 00:14:08 -07:00
Romain Guy
99308c98ba Update Android dependencies (#8224) 2024-10-23 15:49:01 -07:00
show50726
17e4d2b92e Add public API in View for transparent picking (#8206) 2024-10-22 10:46:24 -07:00
Powei Feng
4ee33cd591 Release Filament 1.55.0 2024-10-14 06:07:34 +00:00
Mathias Agopian
d784ce311f gles: add a flag to enable the validation of the nativewindow
We are seeing a cluster of crashes that could be due to using an
EGLSurface whose ANativeWindow has become invalid. This could happen if
we continued to use (i.e. draw with) an EGLSurface after 
SurfaceHolder::onSurfaceDestroyed() has returned.

This new flag enables an assertion that the native window is valid at
the time of makeCurrent(), which happens early in the frame.

BUG=[330392256]
2024-10-10 13:38:35 -07:00
Powei Feng
b1b2d7072d Revert "Release Filament 1.55.0" (#8191)
This reverts commit 4f5369cefa.

Reason: Initial attempt to release 1.55.0 failed due to a few
   small bugs.
2024-10-10 12:16:00 -07:00
Benjamin Doherty
4be172050d Fix Android build 2024-10-04 13:45:22 -07:00
Powei Feng
4f5369cefa Release Filament 1.55.0 2024-10-01 17:09:03 +00:00
Benjamin Doherty
3f37efe4c9 Release Filament 1.54.5 2024-09-24 12:34:25 -07:00
Powei Feng
dd7106bfcf Release Filament 1.54.4 2024-09-17 15:24:57 -07:00
Powei Feng
72ba2eee6d Release Filament 1.54.3 2024-09-10 12:26:44 -07:00
Sungun Park
1b4afbab51 Release Filament 1.54.2 2024-09-04 18:55:52 +00:00
Sungun Park
0e0f3a5518 Release Filament 1.54.1 2024-08-27 23:30:26 +00:00
Powei Feng
28ef805e5d Release Filament 1.54.0 2024-08-20 08:55:10 -07:00
Powei Feng
cdd0147a17 Release Filament 1.53.5 2024-08-13 15:59:08 -07:00
Benjamin Doherty
56f714633d Release Filament 1.53.4 2024-08-08 12:12:27 -07:00
Sungun Park
4125802644 Release Filament 1.53.3 2024-07-31 16:22:54 +00:00
Mathias Agopian
e7c96cd124 better handle skipped frames and cache eviction
Add Renderer::skipFrame() which should be called when intentionally 
skipping frames, for instance because the screen content hasn't changed,
allowing Filament to performance needed periodic tasks, such as
cache garbage collection and callback dispatches.

We also improve the ResourceAllocator cache eviction policy:
- the cache is aggressively purged when skipping a frame
- we aggressively evict entries older than 3 frames

The default Config is now set to a more agressive setting.
2024-07-25 17:23:04 -07:00
Mathias Agopian
730bc99025 Move the ResourceAllocator from Engine to Renderer
The ResourceAllocator used to be global and owned by the Engine, this
was causing some issues when using several Renderers because each
one could cause the eviction of cache data for another.

We now have a ResourceAllocator per Renderer, which makes more sense
because most resources are allocated by the FrameGraph.

We also introduce a ResourceAllocatorDisposer class, which is used
for checking in and out a texture from the cache, and destroy the
texture when it's checked-out. That objet is still global.
2024-07-25 17:23:04 -07:00
Sungun Park
9057c47a56 Release Filament 1.53.2 2024-07-23 01:23:57 +00:00
Mathias Agopian
f7a5111106 switch to new morphing API
- remove deprecated morphing APIs
- repair gltfio, samples and tests

The new API doesn't allow a MorphTargetBuffer per RenderPrimitive,
instead the MorphTargetBuffer is specified per Renderable.

gltfio separates RenderPrimitives from Renderables, in particular all
RenderPrimitives are created before their Renderable; this was
problematic for this change because all primitives must share
a single MorphTargetBuffer living in the Renderable.

To fix this, we're no longer initializing the morphing paramters
at RenderPrimitive creation, instead we store a reference to the
BufferSlot in the Primtive structure, so that later, when the Renderable
is created we can finally retrieve the BufferSlot and initialize its
morphing paramters, which are not available. The "morphing parameters"
are now expanded to contain the MorphTargetBuffer as before (except now
it's always the same for all the primitives of a Rendrable), as well
as the offset within the buffer and the vertex count.
2024-06-28 12:14:57 -07:00
Tibor Hencz
a2fe9f745c Add ability to disable panning in the OrbitManipulator (#7928) 2024-06-27 00:05:14 +00:00
Benjamin Doherty
659b8b6e03 Release Filament 1.53.1 2024-06-25 11:46:46 -07:00
Mathias Agopian
d15c53e530 an easier way to pipe vsync time to beginFrame
BUGS=[343764098]
2024-06-21 09:41:19 -07:00
Mathias Agopian
213eb6af9e Lit Materials can now specify the quality of SH computations
The number of SH bands used for the indirect light irradiance
computations can be set to 1, 2 or 3 (default) in Material::Builder.

For e.g. in lower-end devices w/ non HDR content, it might be
beneficial to set this value to 2.

BUGS=[341971013]
2024-06-20 10:25:04 -07:00
Benjamin Doherty
e95edef9d7 Release Filament 1.53.0 2024-06-17 17:26:47 -07:00
Benjamin Doherty
df34f92f8f Release Filament 1.52.3 2024-06-11 16:42:10 -07:00
Romain Guy
68c7a6c7b6 Update Android dependencies to latest (#7902) 2024-06-04 22:33:02 +00:00
Mathias Agopian
b5d7de06bc Engine::unprotected() drops the command queue back to unprotected mode
FIXES=[344021154]
2024-06-04 11:46:00 -07:00
Sungun Park
3c46788e06 Release Filament 1.52.2 2024-06-03 18:10:27 +00:00
Ben Doherty
51d749f451 Deprecate use of hat-trie (#7889) 2024-05-30 15:45:33 -07:00
Powei Feng
783c35e85b Release Filament 1.52.1 2024-05-29 16:19:30 -07:00
Benjamin Doherty
c7202c575a Release Filament 1.52.0 2024-05-21 12:47:58 -07:00
Mathias Agopian
18ccf0cd8d change the morphing API so it uses only one buffer per renderable
The current API allowed to have a buffer for each primitive in a
renderable. We instead restrict the API so that there is a single 
MorphTargetBuffer for the whole renderable, shared by all primitives.
The buffer can be shared thanks to the "offset" parameter on
setMorphTargetBufferAt().

Also
- fix FMorphTargetBuffer::updateDataAt()
- add support for the "offset" parameter of setMorphTargetBufferAt()
2024-05-16 14:11:07 -07:00
Powei Feng
a9f3971989 Refactor stereo build flags and configs (#7857)
- Add option to build.sh to build for paritcular stereo
   techniques (default to NONE). Only applies to samples.
 - Consoldiate viewer checkbox for debugging stereo rendering
 - Add DriverConfig flag for stereoscopic type so that it can
   be used to determine availability of the feature and
   (to be completed) enable corresponding GPU features.

Co-authored-by: Mathias Agopian <mathias@google.com>
2024-05-16 17:37:27 +00:00
Mathias Agopian
6dd6db89d5 align android libraries to 16 KiB 2024-05-13 23:14:32 -07:00
Sungun Park
6fc16bdcda Release Filament 1.51.8 2024-05-13 20:53:36 +00:00
Ben Doherty
1b38cda0d5 Add preferredShaderLanguage Java bindings (#7835) 2024-05-08 14:42:40 -07:00
Powei Feng
17f71c9b81 Release Filament 1.51.7 2024-05-07 14:35:42 -07:00
Mathias Agopian
b056c126fe Add an Engine debug setting to force GLES 2.0 (#7829)
* Add an Engine debug setting to force GLES 2.0

This setting is only meaningful on GLES backends, it's otherwise
ignored. When set to true, the backend will try to force a ES2 context
if supported. If not supported by the platform,
the backend will pretend it's a ES2 context.

This setting is currently only taken into account by the EGL platform.

* Update filament/backend/include/backend/Platform.h

Co-authored-by: Powei Feng <powei@google.com>

---------

Co-authored-by: Powei Feng <powei@google.com>
2024-05-07 09:53:31 -07:00
Benjamin Doherty
56fa078376 Release Filament 1.51.6 2024-04-29 16:49:28 -07:00
Eliza Velasquez
bfab9f9c32 engine: Add isPaused() 2024-04-25 16:11:14 -07:00
Sungun Park
315726678e Release Filament 1.51.5 2024-04-22 20:47:55 +00:00
Mathias Agopian
83acf0f9de fix hello triangle build 2024-04-18 00:38:26 -07:00
Mathias Agopian
3bffd90357 don't crash if we don't have a Camera set on View (#7766)
* don't crash if we don't have a Camera set on View

- also add a method to query if a camera was set

* Update android/filament-android/src/main/java/com/google/android/filament/View.java

Co-authored-by: Powei Feng <powei@google.com>

---------

Co-authored-by: Powei Feng <powei@google.com>
2024-04-16 21:09:21 +00:00
Mathias Agopian
b21dfd5ea2 add a couple way of validating MaterialInstances (#7754)
* add a couple way of validating MaterialInstances

BUGS=[333907416]

* Update filament/include/filament/Engine.h

Co-authored-by: Powei Feng <powei@google.com>

* Update filament/include/filament/Engine.h

Co-authored-by: Powei Feng <powei@google.com>

---------

Co-authored-by: Powei Feng <powei@google.com>
2024-04-16 12:12:20 -07:00