Shader model (desktop or mobile) wasn't really accounted for
in the UI. This means that we will get shaders that look like
duplicates (same variant). In this work, we pass the current
shader model from engine into the frontend and filter out
variants of a different shader model.
Moreover, for matinfo, we use a specific dbg shader model (matinfo)
to indicate it is in that mode. We add UI in matinfo to show the
shadermodel.
So UI updates as well.
- The set of active variants were not set correctly for surface
materials since the frag/vert pairs could have different
variant.
- Fix the default selection logic in the UI
- Random clean-ups
FIXES=328699979
* Enable fgviewer for the users
* Fix incorrect position
* Update
* Support remote debug server
* Enable fgviewer on android
* Link and include fgviewer_resources
* Adjust js to show untitled view
* Add resource detail
* Add to_string for texture format
* Fix the type of currentResourceId
* Update
* Refactoring
* More refactoring
* Rename some properties
* Rename a function
* Address the comment
* Update the comment and remove if statement
* Fix indent
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.
We are not correctly handling gltf models with multiple color
attributes. Filament doesn't allow for more than one color
attribute. So we just set the additional attributes as
VertexAttribute::CUSOM(N).
Fixes#8396
Enabling UBSan shows the following error:
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior filamat/src/eiff/Flattener.h:102:17 in
filamat/src/eiff/Flattener.h:102:17: runtime error: applying non-zero offset 8 to null pointer
We reference a placeholder byte on the heap when in DryRunner mode
to workaround this issue.
We are in the process of updating glslang, which requires
set(IOS_MIN_TARGET "13.0")
This is a problem since we are targeting iOS 11 in general.
glslang is a filamat depedency, and we're building filamat for
iOS for the iOS version of the backend test.
So one solution is to set set(IOS_MIN_TARGET "13.0") for the
backend test. And we might revisit this solution later.
But for now, we simply disable backend tests (and filamat tests)
for iOS.
* Introduce FrameGraphInfo class
* Move the assignment into pimpl
* Make ctors explicit
* Add ctors to fg info structs
* Revert the macro change to align with existing
* Address the comments
* Remove pimpl and move func def to .cc
* Fix
* Convert the FrameGraph to FrameGraphInfo
* Initialize and update debug server on engine side
* Fix compile error
* Address the comments
* Update
* Use camelCase
* Use camelCase
* Update
* Add JsonWriter to convert fginfo to json
* Add getStatus api and implement it
* Add increment
* Implement GET apis
* Fix compile error
* Update
* Use c_str_safe
* Add operator== for FrameGraphInfo
* Call updateFrameGraph in appropriate locations
* Address the comments
* Add webview for fgviewer
* Remove head and tail bracket
* Fix the table element
* Force web to re-render when fg info gets updated
* Skip culled resources
* Mark subresources as gray
* Add parent info for subresources
* Collapse subresources into their parent resource
* Make the leftmost column fixed
* Remove unused stuff in html
* Fix the comment
* Refactor the code
* Cull unused resources
* Update
* Fix the naming
* Format the file
* Merge multiple resource node in to single resource
* Improve the logic and naming
* Refine the code
* Introduce FrameGraphInfo class
* Move the assignment into pimpl
* Make ctors explicit
* Add ctors to fg info structs
* Revert the macro change to align with existing
* Address the comments
* Remove pimpl and move func def to .cc
* Fix
* Convert the FrameGraph to FrameGraphInfo
* Initialize and update debug server on engine side
* Fix compile error
* Address the comments
* Update
* Use camelCase
* Use camelCase
* Update
* Add JsonWriter to convert fginfo to json
* Add getStatus api and implement it
* Add increment
* Implement GET apis
* Fix compile error
* Update
* Use c_str_safe
* Add operator== for FrameGraphInfo
* Call updateFrameGraph in appropriate locations
* Address the comments
* Add webview for fgviewer
* Remove head and tail bracket
* Fix the table element
* Force web to re-render when fg info gets updated
* Skip culled resources
* Mark subresources as gray
* Add parent info for subresources
* Collapse subresources into their parent resource
* Make the leftmost column fixed
* Remove unused stuff in html
* Fix the comment
* Refactor the code
* Cull unused resources
* Update
* Fix the naming
* Format the file
* Fix naming
* Address the comments
* Address the comment
* Introduce FrameGraphInfo class
* Move the assignment into pimpl
* Make ctors explicit
* Add ctors to fg info structs
* Revert the macro change to align with existing
* Address the comments
* Remove pimpl and move func def to .cc
* Fix
* Convert the FrameGraph to FrameGraphInfo
* Initialize and update debug server on engine side
* Fix compile error
* Address the comments
* Update
* Use camelCase
* Use camelCase
* Update
* Add JsonWriter to convert fginfo to json
* Add getStatus api and implement it
* Add increment
* Implement GET apis
* Fix compile error
* Update
* Use c_str_safe
* Add operator== for FrameGraphInfo
* Call updateFrameGraph in appropriate locations
* Address the comments
The definition of the froxel buffer sizes were spread across
multiple places and for different use cases (including
allocating the buffer, setting to a descriptor set, and adjusting
the relevant spec constant). In this commit, we try to unify
the size definitions into Froxelizer::getFroxelBufferByteCount().
We also remove the vulkan-only special case for froxel buffer
UBO. This case was introduced because spec constant couldn't be
used to size arrays for some drivers in the past, but we introduced a
workaround that replaced spec constants with constants.
1. changes weren't refreshed for windows/linux-mesa vulkan. This
is due to a reordering of the shaders when the shader source
is replaced. We fix this by ensuring the ordering before
writing out the edit.
Fixes#7286
2. A condition was flipped in the SourceFormatter causing the
format feature to not work on linux
3. The material update status wasn't really propagated to the
front-end due to not updating the status counter.
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
When targeting Vulkan with multiview, the shader
code generator was using the OpenGL extension
and built-in variables, which are not supported on
Vulkan.
Changed it to use GL_EXT_multiview instead of
GL_OVR_multiview2 when the target API is Vulkan.
* Introduce FrameGraphInfo class
* Move the assignment into pimpl
* Make ctors explicit
* Add ctors to fg info structs
* Revert the macro change to align with existing
* Address the comments
* Remove pimpl and move func def to .cc
* Fix
* Convert the FrameGraph to FrameGraphInfo
* Initialize and update debug server on engine side
* Fix compile error
* Address the comments
* Update
* Use camelCase
* Use camelCase
* Update
This commit renames all shader snippet files to conform to the newly
introduced naming convention outlined in README.md.
The new naming convention uses a `prefix_name.suffix` format to clearly
indicate the purpose and target shader stage of each snippet. This
improves the overall organization and readability of the shader code,
making it easier to understand how each snippet contributes to the
shader generation process.
No functional changes were made to the shader code itself or source
code. This is purely a refactoring for clarity and maintainability.
* Introduce FrameGraphInfo class
* Move the assignment into pimpl
* Make ctors explicit
* Add ctors to fg info structs
* Revert the macro change to align with existing
* Address the comments
* Remove pimpl and move func def to .cc
* Fix
* Address the comment
* Remove redundant qualifiers in filament public headers
* remove redundant qualifiers in filament implementation
* remove redundant qualifiers in libutils public headers
* remove redundant qualifier for libutils implementation
* remove redundant qualifiers for libmath
* use is_same_v<> instead of is_same<>
* bring back Builder::name()
we keep Builder::name() on all object, and forward to the MixIn class
that does the implementation, so that we have correct documentation, and
better IDE completion.
* add missing const parameters in filament's implementation
* various source cleanup
- missing includes
- missing const
- C cast style
- superfluous inline keyword
* validate MaterialInstance references when destroyed
With this change we now enforce two things:
- All MaterialInstance of a Material must be destroyed when
destroying said Material. This has always been a documented
requirement of the public API, but wasn't enforced (only
a warning was printed).
This new assertion is unconditional.
- A MaterialInstance, when destroyed is no longer in use by any
Renderable.
So before destroying a MaterialInstance, the user of API needs to
ensure that either all Renderable using that MaterialInstance in one
of their Render Primitives are destroyed, or, that these Renderable
using that MaterialInstance are reset to another one or to null.
There is a new RenderableManager::clearMaterialInstanceAt() that can
be used to clear a MaterialInstance on a Render Primitive.
Additionally, a Render Primitive with a null MaterialInstance is now
silently skipped during rendering, instead of a null-dereference.
Finally, that second assert is protected by a new feature flag:
"features.engine.debug.assert_material_instance_in_use". This flag is
enabled on DEBUG builds and disabled on RELEASE builds by default.
The flag can be changed at any time using `Engine::setFeatureFlag()`.
BUGS=[333907416]
* Update filament/src/components/RenderableManager.cpp
Co-authored-by: Powei Feng <powei@google.com>
---------
Co-authored-by: Powei Feng <powei@google.com>
This feature is controled by a feature flag and is turned off at this point.
This CL shouldn't change the existing behavior of shadowmap allocation as
long as the atlas feature is not enanled.
When enabled, shadowmap allocations are not limited to layers of the
shadowmap texture, instead, an atlas is used meaning a layer can
be shared by multiple shadowmaps. At the very least this can save
a lot of memory as smaller shadowmaps can be packed together.
Currently this feature breaks some VSM features:
- mipmapping
- blurring
- when inserting an entry at a root other than zero, we need to update
the children count of the root's parent.
- the QuadTree array nodes need to be able to encode enough indices for
the largest "layer" in the tree. With 7 layers the largest one has
4096 entries, so we need 12 bits, not 8.
We use clang-format to format the shader files. Since we assume
clang is necessary for compilation, installing clang-format should
not be too much of an overhead in terms of adding dependency.
Currently, we only support posix systems (macOS, linux).