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.
* Implement query to check if texture format is mipmappable
This will allow Filament's users to perform check beforehand.
* add java bindings
* add javascript binding
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 new MaterialInstance::setCullingMode(color, shadow) API allows to
set a separate face culling mode for the color pass and the shadow
passes.
FIXES[391679058]
Now the helper function `getEyeIndex` becomes available for all shader
stages including post-processing. It used to be only accessible from
surface vertex shaders.
The API works this way:
```
auto vendor = OpenGLPlatform::getVendorString(engine->getDriver());
```
Obviously the Backend must be `Backend::OPENGL` and the `Driver` must
have been created with an `OpenGLPlatform` subclass.
FIXES=[385367277]
The current API used a void* in Texture::setExternalImage to pass
the platform specific image. This was a problem because on some
platform like Android, there could be several types (EGLImageKHR and
AHardwareBuffer), and with the void* there was no way to distinguish
them on the backend / platform side.
We now have a new Texture API which takes a
Platform::ExternalImageHandle, which is a reference-counted handle
to a Platform::ExternalImage. Platform::ExternalImage is an opaque
type only known by the platform.
This type must be created using a concrete Platform specific API, such
as:
PlatformEGL::createExternalImage
PlatformEGLAndroid::createExternalImage
PlatformCocoaGL::createExternalImage
PlatformCocoaTouchGL::createExternalImage
New types can easily be added in the future.
There is no "destroy" call because the Platform::ExternalImageHandle is
reference-counted and the client can let go of it as soon as it
doesn't need it any longer (typically after calling
Texture::setExternalImage). Platform::ExternalImage is a small
structure that just anonymously wraps the concrete types.
New internal driver APIs have been added to handle this functionality.
If FXAA is the last post process effect (i.e. no upscaling), and
color grading produced a luma channel, then FXAA needs to reset the
alpha channel to 1.
This will allow a more lenient rollout of the assertion, which
otherwise will increase crashes for current clients.
We also disable features.engine.debug.assert_material_instance_in_use
by default (it was enabled for debug builds).
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
- clarify precondition for VirtualMachineEnv, in particular,
JNI_OnLoad() must be called from a thread attached to the VM, and
should be called once. This is now enforced internally, subsequent
calls are ignored.
- sVirtualMachine was written and read from potentially different
threads without synchronization. It is now mutex protected.
- added fatal asserts in all locations that we cannot recover from;
previously we would stay in an undefined state.
BUGS=[390724273]
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.
The old version that doesn't take a timeout now always waits forever;
before it waited for a few seconds on Android debug builds.
The new version has an explicit timeout that works on all platforms and
returns success status.
FIXES=[384043020]
SGSR stands for Snapdragon Game Super Resolution. It is an efficient
upscaler for mobile.
Split the upscaling passes into multiple methods in PostProcessManager.
Also, add a way to preserve the alpha channel in the FXAA pass.