we now store the kernel for each lod in a texture, this has several
advantages:
- the texture can be reused, so we can amortize that cost a bit
- we could generate the texture with a shader, so that we don't
have to do any texture uplaod (TBD).
Until now we were using TARGET_MOBILE in our shaders for both
quality setting and correctness.
With this PR we introduce a new define FILAMENT_QUALITY which currently
can take two value FILAMENT_QUALITY_LOW and FILAMENT_QUALITY_HIGH and
we use that instead of TARGET_MOBILE for quality settings.
Currently, FILAMENT_QUALITY_LOW is selected when TARGET_MOBILE is set.
New Api:
- Renderer::renderStandaloneView() is a new method that can be used
outside of beginFrame/endFrame on Views that have a RenderTarget
associated. This can be used as a poor man's compute API.
Improvements to Renderer:
- more aggressively skip lighting/shadowing code that won't be
needed by the current view
- Allow up to 64 KiB to be allocated from the render stream, up from
1 KiB
Even though the vertex shader comes before the fragment shader,
both bits needs to be present in the barrier, since a Vulkan
implementation might partition its uniform cache between stages.
Thanks to Chris Forbes for pointing this out.
After eyeballing this barrier I realized it was configured incorrectly,
but it did not seem to manifest as an actual error anywhere.
Basically, it needs to ensure that the UBO is fully updated before it
is read by the vertex shader associated with the next draw call.
This will allow folks to drop a GLB into the following page to get a
WebGL preview. It always uses the latest version of Filament via unpkg.
https://google.github.io/filament/viewer
After the next release we can also use the `<filament-viewer>` component
itself from unpkg and remove the local copy.
- If a resource file is missing, show toast instead of crashing.
- Allow glb files in zip files.
- Run blocking calls like createTempFile() on IO thread.
It's an error to ask for a higher MSAA sample count than supported by
the gl driver, and results in corrupted rendering.
We now always clamp the requested sample count to the maximum allowed
but the gl driver.
includes some minor refactoring.
Some drivers claim to support anisotropic filtering but don't allow
setting it via glSamplerParameter. Until now we were disabling
anisotropic filtering entirely on these drivers at compile time.
With this change, we should detect at runtime which drivers have this
issue and use a workaround -- instead of disabling anisotropic
filtering entirely.
- it was called on the main thread side, which didn't allow to,
for instance, systrace commands on the backend thread side.
- moved to a begin/end callback model
- implemented basic logging/systracing for all backends in Driver.cpp
(and removed this functionality for the metal driver).
note: refactored CommandStream class attributes only to work around
a clang bug we running into in CI.