* Add GTAO options into the struct
* Add gtao mat and shader
* Set type specific parameters in ppm
* Fix inconsistent name
* Fix incorrect param type
* Add bent normal calculation
* Fix the gui
* Adjust precision
* Use mix
* Add some comments
* Refactoring
* Update comments
* Add comments for aoOptions
* Update
* Update
* Address the comments
* Split .mat into bent and non-bent
* Update
* Update
* Use sqrt on mobile
* Omit default case
* Commit beamsplitter generated changes
* Use built-in acosFast
* Remove unused function
* Fix the mismatched parameter type
* Some optimizations
* Commit beamsplitter results
* Update the comment
* Update default value
* Commit beamsplitter changes
* Extract common parameters out
* Make sure that all descriptors are always initialized
* improvements to committing material instances
- from now on, only MaterialDomain::SURFACE material instances are
automatically committed by FEngine at the beginning of a frame.
COMPUTE and POST_PROCESS domains must be committed manually via
a new API on MaterialInstance. Both domains are not public APIs so
this shouldn't have an impact anywhere.
- DescriptorSet now validates that all descriptors are set and emits
an error in the log if not.
- these changes prevent PostProcess material instances to be committed
before all descriptors are set.
* Update filament/src/details/Engine.cpp
Co-authored-by: Powei Feng <powei@google.com>
---------
Co-authored-by: Powei Feng <powei@google.com>
* re-do "Use the Perfetto SDK instead of ATRACE" (#8701)
This time we create an entirely new private header: Tracing.h which
uses the perfetto SDK instead of ATRACE. The old Systrace.h is
unchanged to presever backward compatibility but is essentially
deprecated and no longer used within the filament repo.
The new TRACING_ macros use an explicit CATEGORY parameter, which is
declared in Tracing.h.
Moreover, tracing can be compiled out by defining
FILAMENT_TRACING_ENABLED to false before including Tracing.h
iOS tracing is still supported and still controlled via
FILAMENT_APPLE_SYSTRACE.
There are three perfetto categories defined:
- "filament/filament"
- "filament/jobsystem"
- "filament/gltfio"
The "filament/jobsystem" category is compiled out by default.
And they can be enabled in AGI / perfetto by adding:
```
data_sources {
config {
name: "track_event"
track_event_config {
disabled_categories: "*"
enabled_categories: "filament/filament"
enabled_categories: "filament/jobsystem"
enabled_categories: "filament/gltfio"
}
}
}
```
* Update libs/utils/include/private/utils/Tracing.h
Co-authored-by: Powei Feng <powei@google.com>
* Update libs/utils/src/android/Tracing.cpp
Co-authored-by: Powei Feng <powei@google.com>
* remove all references to SYSTRACE_TAG
---------
Co-authored-by: Powei Feng <powei@google.com>
* add sampler type in DescriptorSetLayout
[**New Material Version**]
* select the proper descriptor set layout in the rendering loop
Now that the per-view layout can be different based on the type of
shadow, we need to make sure we set the proper layout in the pipeline
and use the corresponding descriptor set.
There are now 16 "per-view" layouts and their corresponding descriptor
set. There are two sets of 8, the current set is determined by the
shadow type on the view.
Then during rendering, when we set the pipeline we need to select the
corresponding layout; each material now offers both versions of the
layout and we just pick the right one.
DescriptorSet::setBuffer and setSampler now need the layout in order
to do some validation that the correct type of descriptor is used.
This will help catch problems earlier.
* DescriptorType now includes the "dimension" of the texture
DescriptorType now also encodes wether the descriptor expects a 2D, 3D,
Cubemap and/or Array.
This is needed by both Metal and WebGPU.
[**New Material Version**]
* Fix typos.
* fix fog sampler descriptor type
We add rvalue version of append/insert/replace so that calling
those on a temporary yields to a temporary.
Also add string literal versions of those so that we can
append/insert/replace a literal without allocation, e.g.:
`CString foo = CString{ bar }.append("baz");`
This will not end-up creating a temporary CString for "baz".
I've been going back and forth on whether we information about the
per-view descriptor set layout should be written in the material
file.
In this change, we remove that dependency. By definition the
"per view" descriptor-set layout should only depend on view parameters
and obviously, all materials must be compatible.
In practice, a material does affect the layout so a reconciliation
needs to happen somewhere. It's easier to maintain to have all this
logic in one place (in Filament) instead of split between material
generation and filament.
All this change really does is to remove the information about the
per-view layout from the material file, and move it to Material in
filament, where it is hardcoded (before it was hardcoded in filamat),
but because both sides needed to match there was shared code.
**Material recompilation needed**
the main aim of this PR is to consolidate how we access the
"per view" descriptor set to a single place.
some validation code is moved into DescriptorSets.cpp, so we get a
more centralized idea of what we do with the descriptors.
also factorize in one place the filtering of sampler list by layouts.
* Export graphviz data to the webview
* Fix some errors
* Fix colors
* Only show toggle when view selected
* Update
* Merge graphviz data into json string
* Mark export_graphviz function as const
* Set SERVE_FROM_SOURCE_TREE to 0
* Remove unnecessary import
* Refactor
* Refactor
* New line when early return
clang optimizes code differently with very likely or unlikely
conditions, so we add a `VERY` version of these macros, and we
make use of it for assertions.
- PR #8641 introduced a requirement for including Systrace.h that
wasn't covered by the header-check test.
- Make sure temp.cpp contains only one include
- Add a missing include for Package.h
Perfetto has significantly less overhead. The User facing API is
mostly unchanged:
Here are the differences:
- SYSTRACE_ENABLE() does nothing on ANDROID, initializes systraces on darwin.
- SYSTRACE_DISABLE() is removed.
- A new "gltfio" tag is added.
- SYSTRACE_TAG *must* be defined before including `utils/Systrace.h`
- `utils/Systrace.h` should not be used from a public header
- the new SYSTRACE_TAG_DISABLE disables systrace at compile time
For android a data source MUST be created in the perfetto config:
```
data_sources {
config {
name: "track_event"
track_event_config {
enabled_categories: ["filament", "jobsystem", "gltfio"]
disabled_categories: "*"
}
}
}
```
This can for example be added to AGI's custom/advanced config.
FIXES=[407572663]
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.