The VSM variant bit was overloaded, it meant two different things
depending on the DEP bit (depth).
For standard variants (DEP = 0), it decides the type of the shadow
sampler used (PCF or 2D).
For depth variants (DEP = 1), it decides what is written during the
shadow pass (nothing, i.e. depth only, or EVSM depth moments).
We now clearly separate the two bits throughout the code.
This change should be purely source-cosmetic, there shouldn't be any
behavior changes.
Co-authored-by: Powei Feng <powei@google.com>
The previous code used the max of the texel's width or height footprint
in world space to compute the offset; this could both overestimate or
underestimate the bias causing some peter panning or acne.
The new code replaces a sqrt with a dot, but is otherwise similar.
The previous code was a bit clunky and not generic, it made assumptions
about the shape of the projection matrix.
This just uses the generic, correct calculation.
In addition the previous code used the wrong matrix, it assumed that
Wp wasn't needed, but it was because translations do change the
jacobian value at a given point.
RDIFF_ACCEPT_NEW_GOLDENS
- Introduces the `RDIFF_ACCEPT_NEW_GOLDENS` commit message tag.
- Conditionally skip the `test-renderdiff` presubmit comparison
if this tag is present.
- Extracts renderdiff generation into a reusable
`.github/actions/renderdiff-generate` composite action.
- Modifies `postsubmit-main.yml` to automatically generate new
goldens and push them to a temporary
`accept-goldens-<short-hash>` branch before merging them into
`main` when the tag is found.
If a framebuffer is destroyed while a command buffer is in flight (e.g.
during a window resize), it's possible for a command buffer to try to
use a framebuffer that no longer exists. This encapsulates framebuffers
and render passes in resource_ptr, to ensure they are never reclaimed
prematurely.
The previous datareshaper change used too multiple parameters
in templates in an attempt to reduce conditionals in the hot-loop.
However, this dramatically increased the binary size.
This change keeps the original intention of not having conditional
in the inner loop, but isolate small sections that need to be
templated into separate components.
* Adding the begin frame message for later xtrace post processing.
* Add the flags.
* Cleanup
* Cleanup
---------
Co-authored-by: Powei Feng <powei@google.com>
- Add a presubmit check after the android build to check the
built artifact sizes against previous build sizes.
- If the size built is +20K over the previous, then the test
fails.
- This prevents dramatic size increases of our mobile build
- add half float as source type
- gray-scaled output when src-channel=1 and dest-channel=3 or 4
- Ensure that per-pixel work is as-constexpr-as-possible
* fixbug:"debug error, reason: The material 'Material_MR' has not been compiled to include the required GLSL or SPIR-V chunks for the vertex shader (variant=5, filtered=5)",Because the member variable mVariantFilter is not initialized, random values will appear on Windows 10 or others platform, which eventually causes some variants to be filtered out by this mVariantFilter.
* fix:Fix morph target loading for accessors without buffer_view
Morph targets were not working because ResourceLoader skipped all
accessors without buffer_view. For morph targets, the data can be
accessed directly via cgltf_accessor_unpack_floats().
This fix properly unpacks and uploads morph target vertex data to the
GPU, enabling blendshapes and facial deformation to work correctly.
Steps to Reproduce
1、In Unity (2022.3.11): Create a Prefab with Blend Shapes (Morph Targets) and an Animator to control them (e.g., an animation clip that makes the eyes squint).
2、Export: Use the UnityGLTF tool to export the model as a .glb file (including the Animator and Morph Target tracks).
3、In Filament: Load and play the animation.
4、Result: The skeletal animation (bone-based) may play, but the Morph Target effect (squinting) is missing or static.
- Update UI
- Wait for resources to finish loading before testing
- Refactor validation to input/output
- Move assets to be generated from the repo
- Fix AutomationEngine java binding to add missing fields
- Add a script to test/sizeguard to compute sizes of artifacts
within a compressed file.
- Add a step to postsubmit-main.yml that will run the above
script on every commit to main.
This will enable us to add a presubmit step to guard against
dramatic size increases in the Android build.
This fixes#9701 by replacing shell execution (`shell=True` and
`os.system`) with direct subprocess calls using argument lists in
`tools/zbloat/zbloat.py`
Previously, the script used f-strings to pass paths directly into a
shell command, which created an unnecessary risk: if an external archive
contained files with shell metacharacters, it could lead to accidental
or malicious command execution during analysis.
By passing arguments as lists, the subprocess module maps them directly
to the executable, bypassing the system shell and eliminating the
vulnerability.
When UboManager::reallocate() is triggered, a large number of material instances may be invalidated simultaneously. This leads to a massive spike in descriptor set updates and command generation, which can overflow the circular buffer.
To prevent this, we now flush commands in batches, we trigger a flush whenever the command buffer usage exceeds half of its capacity. (Like what RenderPass::Executor::execute does)
BUGS = [474264976, 479079631]
In some cases the external image to be imported is
flagged as using a sRGB dataspace but when the AHB
is imported its actual format is UNDEFINED and
requires an external sampler.
In these cases, its not valid to set the
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag.
See VUID-VkImageCreateInfo-pNext-02396
FIXES=[483456747]
Introduce a new cube sample that utilizes the feature level 0 (FL0) on
the web. The `Engine.create` method accepts `config` as an argument,
allowing users to explicitly request a GLES 2.0 context.
In addition, this change helps a future implementation of asynchronous
support for web, allowing the asynchronous mode to be turned on via the
configuration setting.
BUGS=[476134614]
* VK: Fix the descriptor set layout mismatch errors
Depending on how the descriptor sets and external
sampled images are used is possible to get a lot of
errors about the pipeline layout and the descriptor
set layouts dont match with the validation layers.
This causes flicking artifacts and textures not being
displayed.
This is a partial rewrite of the implementation when
using external samplers through a MaterialInstance.
* Addressing review comments