* Materials can now specify a shadow strength factor
Materials have a new property: shadowStrength that can be used to
attenuate all shadows received by this material. e.g.:
```
void material(inout MaterialInputs material) {
prepareMaterial(material);
material. shadowStrength = 0.1;
}
```
FIXES=[391663042]
Co-authored-by: Powei Feng <powei@google.com>
---------
Co-authored-by: Powei Feng <powei@google.com>
Subpasses should not be used anyways due to the result of WebGPUDriver::isFrameBufferFetchSupported. However, we need to make sure the GLSL is not generated for WebGPU, or Tint is unable to convert.
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.