Building tools separately is necessary for the existing
cross-complation usecase. We generalize this by introducing
two cmake vars that enable exporting and importing
prebuilt tools.
The intended usecase is to enable ASAN-built filament without
having to run ASAN-built matc (which is prohibitively slow).
build.sh has been modified to add a `-y` flag forprebuilding
tools.
* Add new public API to query a sampler transform name field.
This new API will let filament users query a Material object
the value of the `transformName` field of a specified sampler
parameter.
The transformName is an optional field, so if its not defined
by the user, it will return a nullptr value.
- A new test was added to test_filamat to validate the serialization.
- A new parameter was added to the test sandboxLit material to
validate the parsing a material with the new field.
* Addressing review comments
- Add java and js bindings for the new API
- Tests for querying the getParameterTransformName
* Use utils::ImmutableCString for transformName
* Updating release notes
* Review comments
* Addressing more review comments
- Fix comments
- For the java binding return an empty string when the
transform is not present.
* Add a Renderer API to force skipping frames
Renderer::skipNextFrames(size_t) can be used to force filament to
pretend the next N frames must be skipped. This is mostly useful for
debugging.
* Add DebugOptions to Settings
We still need to move the "Debug" features of gltf_viewer to this,
but this give us a framework to do it.
Currently there is one debug option that allows to set a number of
frames to skip.
ViewerGui propose a button to skip 10 frames using this framework
* Update libs/viewer/src/Settings.cpp
Co-authored-by: Powei Feng <powei@google.com>
* Update libs/viewer/src/Settings.cpp
Co-authored-by: Powei Feng <powei@google.com>
---------
Co-authored-by: Powei Feng <powei@google.com>
* slice: fix memory semantics
* slice: prefer passing slice by value
This lets us do nice things like coercing Slice<T> to Slice<const T>, etc.
* slice: fix unit tests
* slice: fix copy/assignment, hash function
Don't attempt to define a copy constructor/assignment operator which would
convert a constant type to a mutable type.
Additionally, fix the hash function such that we're hashing U instead of const
U.
FilamentApp now has debugging options to enable or disable the
camera and directional shadow frustums, as well as the new
"froxel grid" visualization.
"froxel grid" is automatically enabled when "froxel debugging" is
enabled in the debug gui in gltf_viewer.
New corresponding debugging APIs were added to View.
- Add a Configuration struct to the WebGPUPlatform class. This
allows for client-side setting of WebGPU backend configurations.
- Add a configuration for forcing the wgpu backend to pick a
certain backend.
- Add Vulkan as a potential backend for WebGPU + MacOS.
- Locally modify Dawn so that it does not assume only switfshader
is available for Vulkan on MacOS.
- Enable vulkan support for Dawn (third_party/dawn/tnt/CMakeLists.txt)
- Plumb option to pick different WebGPU backend through
FilamentApp and gltf_viewer.
* [Fix] frame_generator sample: open ifstream with ios::binary
* [Fix] frame_generator sample: allocate storage for g_materialBuffer
reserve() merely reserves memory, but does not actually change the size of the vector.
* [Fix] frame_generator sample: destroy materials/renderables during cleanup
Otherwise the sample crashes with a Filament error saying that the material is still associated with a renderable.
* materials: introduce mutable spec constants
Rationale & design of this feature has been discussed internally.
The current implementation uses a `FixedCapacityVector` to store the new program
handles, but I wouldn't object to replacing it with a hasmap as discussed
offline.
I have compiled but not tested this yet on Android, so I'm not certain that the
API bindings are correctly wired up.
* materials: mutable spec constant feedback
* materials: address mutable spec constant comments
Attach MetalLayer to Native View same as vulkan and metal backend.
This change assumes native window is already a CAMetalLayer. This is no different
for IOS and Mac.
Initial groundwork in creating WebGPU backend components, namely
the instance, adapter, device, and queue.
If configured to do so, the backend will print out details about
these components.
The samples/hellotriangle.cpp was slightly modified to include a
webgpu option which allows for exercising the above, but does not
yet draw anything to the screen/window.
NOTE: This has only been sanity tested with hello triangle
on Mac OS and the Android emulator at this time, NOT IOS,
Windows, or Linux yet.
PPM does not store alpha channel, but TIFF does. We add a method
to export RGBA to a TIFF file without compression.
We add the corresponding options to gltf_viewer and
AutomationEngine.
The default export format for both gltf_viewer and AutomationEngine
is now TIFF.
The commit 1747ae8f5a enfoces a correct
order for releasing resource. Fix the order to avoid crashes.
Make some samples to use the DEPTH32F format for better compatibility.
Some manufacturers don't fully support DEPTH24 on Vulkan. E.g., AMD
Radeon PRO W6400
Currently mLayerCount for RenderTarget is always updated to the number
of depth for attachments, which incurs unintended behaviors for some
types of textures. i.e., 2d array, cubemap array, and 3d textures.
Fix this by updating mLayerCount only for multiview use case.
BUGS=[369165616]
- Both Scene and IBL are holding on to a skybox reference. We
need to make sure the order they are destroyed in right order.
- Reloading IBL should trigger resetting the indrect light in
gltf_viewer.
Clients can create a multi-layered render target that consists of array
textures, and use it as a custom render target.
A new sample app "hellostereo" demonstrates how to use this feature.
vk, metal and desktop gl all support depth clamp, GLES/android also does
with ANGLE. Add support for it in the backends.
use depth clamp to improve directional shadow quality; this allows
to render everything that's behind the camera at the same "zero" depth,
so we can reduce the depth range we need.
Fixes#6293
vk, metal and desktop gl all support depth clamp, GLES/android also does
with ANGLE. Add support for it in the backends.
use depth clamp to improve directional shadow quality; this allows
to render everything that's behind the camera at the same "zero" depth,
so we can reduce the depth range we need.
Fixes#6293
shadow cascades where not calculated properly because part of the
calculation took the cascade near/far into account, while another
part didn't. This resulted in cascades being too large. It didn't
create wrong shadows, but reduced (and in some case canceled) the
usefulness of the cascade.
We fix the problem by always using the projection matrix only for
describing the cascade's frustum, as opposed to just passing the
near/far plane distances.
Now the calculation of each cascade is completely self contained and
identical.
We also improve the orientation of the light frustum:
We can rotate the light frustum around the light direction axis, so
it aligns with the view direction, this generally result in smaller
light frustums. This cannot be used in stable mode.
- 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.
When a user drags and drops a gltf file to the gltf_viewer window, it
loads the new asset.
While this happens, the function `checkAsset` tries parsing the gltf
file, but it doesn't free it. Fix this.