Commit Graph
3836 Commits
Author SHA1 Message Date
Ben Doherty c827004821 Add getPlatform API to Engine, move functionality into MetalPlatform (#4007)
This change allows access to the Engine's underlying Platform object. This is useful for Metal clients to access a new method on MetalPlatform, createAndEnqueueCommandBuffer.
2021-05-24 10:36:56 -07:00
Mathias Agopian 786eee4eb9 Fix a crash when using custom rendertargets
This was introduced recently.

Fix #3962
2021-05-24 09:53:54 -07:00
Mathias Agopian 92d2de5279 fix MRTs >= COLOR4 in the GL backend
These would be ignored.
2021-05-24 09:53:05 -07:00
Ben Doherty f4070f3fb5 Fix Automation test_settings (#4009) 2021-05-24 09:10:25 -07:00
Alexey Pelykh 856a6567a1 LightManager: cone angles API (#3979) 2021-05-22 22:04:50 -07:00
Mathias Agopian 363edb1427 added MaterialInstance::duplicate(...)
It's now possible to duplicate a MaterialInstance.
2021-05-21 22:57:28 -07:00
Mathias Agopian c209232950 a way to keep the content of custom RenderTarget attachments (#4008)
* a way to keep the content of custom RenderTarget attachments

Until now, all attachments of RenderTarget beyond COLOR0 were discarded
after rendering.

With this change, attachment whose texture has the SAMPLEABLE usage
bit set will be kept.

Fixes #3962
2021-05-21 22:54:52 -07:00
Ben Doherty 3f9120b129 Fix focusDistance warning in gltf_viewer (#4005) 2021-05-21 15:31:46 -07:00
Philip Rideout b1f0f905e5 HDRLoader: use HDRDecoder, not stb. 2021-05-21 12:36:43 -07:00
Philip Rideout c71c7c70d4 imageio: split HDRDecoder into its own file 2021-05-21 12:36:43 -07:00
Philip Rideout 613ae56cc1 Add HDRLoader for JVM clients.
This adds support for decoding HDR files, dropping them into the remote
web page, and sending them over the wire.  However the decoded results
are not yet passed into IBLPrefilterContext, that will be subsequent
PR.

Rename KtxLoader to KTXLoader.

The remote UI has been tweaked a bit, so that it shows a more helpful
message when disconnected.
2021-05-21 12:36:43 -07:00
Philip Rideout 6607002939 ImGuiHelper: fix support for custom images.
The texture binding in the material instance needs to be restored to the
glyph atlas when a custom image is not in use.
2021-05-21 11:49:14 -07:00
Philip Rideout 2e40bb46e7 Fix minor typos. 2021-05-21 11:34:08 -07:00
Philip Rideout 720288c420 JNI Cleanup: Remove useless constructors, publicize RenderTarget.
(1)
The C++ RenderTarget API might be used by an external Android library
such as filament-utils-android and therefore needs to be in the map
file.

(2)
Texture, Skybox, and IndirectLight each had two "nativeObject"
constructors which exist for the benefit of filament-utils-android,
but each of these classes only need one nativeObject constructor.
2021-05-20 15:18:34 -07:00
Romain Guy 97651a0ff4 Use CIE 2006 10-deg CMFs instead of CIE 1931 2021-05-19 12:42:41 -07:00
Philip Rideout 3125c44ce1 Vulkan: change depth layout to permit feedback loops.
Vulkan does not permit the GENERAL layout when the depth buffer that is
currently being used for depth testing is also sampled from.

This (finally) fixes the last validation error that we were silencing,
which would occur only when SSAO was enabled.
2021-05-18 16:38:42 -07:00
Philip Rideout d909b38d57 Vulkan: enable the maintenance extensions if available.
This prevents potentially bogus validation messages from arising.
2021-05-18 16:36:12 -07:00
Ben Doherty 5572ef8574 API CHANGE: remove some Camera, Engine, and View deprecated APIs (#3965) 2021-05-18 16:02:49 -07:00
Philip Rideout 3c4192bd0e matc: detect missing end brace.
matc was failing to report certain kinds of syntax errors and would
read out-of-bounds memory.

This change casuses the flare material to fail.
2021-05-18 10:58:15 -07:00
Philip Rideout 3fc9dc3684 Repair build when FILAMENT_VULKAN_VERBOSE is enabled. 2021-05-17 18:13:51 -07:00
Benjamin Doherty a06e01a196 Update RELEASE_NOTES for 1.9.25 2021-05-17 10:57:02 -07:00
Benjamin Doherty 034b6892f4 Release Filament 1.9.25 2021-05-17 10:55:58 -07:00
Ben Doherty bd8ea711fd Add a FILAMENT_SUPPORTS_OPENGL CMake option (#3966) 2021-05-15 14:40:06 -07:00
Mathias Agopian c1347e55cb add java API for Texture::Builder::import()
deprecate Stream::stream(intptr_t).

This method was needed for ARCore back in the days, but there is now a
zero-copy way to achieve the same thing. This API shouldn't be used anymore.
2021-05-14 17:26:30 -07:00
Philip Rideout afbd6e6606 gltfio: fix morphing bugs uncovered by MorphStressTest.
The code that determined the "base slot" (i.e. the buffer object index
for the first morphed attribute) was very fragile and buggy.
MorphHelper now simply looks up the slot index in a stored mapping,
rather than trying to mimic the AssetLoader to determine the base slot.

Until now, most of the models we tested against only morphed the
position attribute, and never had a large set of target weights that
could be non-zero in a given time slice.
2021-05-14 17:05:27 -07:00
Mathias Agopian d6c5cb7778 workaround a shader compiler bug on qualcomm h/w 2021-05-14 16:58:40 -07:00
Mathias Agopian 43d47745dd API CHANGE: remove deprecated populateTangentQuaternions 2021-05-14 13:35:25 -07:00
Mathias Agopian f0d99070e4 Use a UBO instead of a texture for froxels data structure
MATERIAL BREAKAGE: this change breaks materials

In order to use one less sampler, we now use a UBO instead of a texture
to store the "froxel records". Currently this UBO is limited to 16KiB
vs. 64KiB before with the texture.

We also handle running out of record space better, by using a predefined
record that has all the lights in the scene. This way the scene will be
rendered properly, albeit at a potentially large performance cost.
2021-05-14 11:20:24 -07:00
Alexey Pelykh 6a49d67c6c Allow using specific NDK version, for CI don't use latest but required (#3950)
* Allow using specific NDK version, for CI don't use latest but required

* Default to highest available NDK version within same major release sequence

* Refactor NDK version selection
2021-05-14 11:06:31 -07:00
Philip Rideout 6b7c1b21cb VulkanPipelineCache: fix unbound pipeline error. 2021-05-13 23:33:06 -07:00
Philip Rideout b7d1b4ca1a VulkanPipelineCache: create dummy sampler. 2021-05-13 23:13:49 -07:00
Philip Rideout 8a04d5761b Fix validation on Windows. 2021-05-13 18:25:47 -07:00
Benjamin Doherty 8d8729be8e Remote UI: update viewer with new URL input 2021-05-13 16:46:26 -07:00
Ben Doherty d4325de47d Add URL input to Filament Remote Viewer (#3955) 2021-05-13 16:27:46 -07:00
Philip Rideout e29c76465b Minor improvement to Vulkan robustness. 2021-05-13 13:16:57 -07:00
Philip Rideout a220407aef Vulkan: Fix bistro, implement descriptor pool growth. 2021-05-13 12:28:12 -07:00
Philip Rideout 4df214003e Revert accidental Vulkan diagnostic commit.
This reverts commit 59a6758fce.
2021-05-13 08:56:48 -07:00
Philip Rideout 182250b9c0 VulkanPipelineCache: minor cleanup. 2021-05-13 08:34:02 -07:00
Philip Rideout 59a6758fce DO NOT COMMIT 2021-05-13 08:33:57 -07:00
Philip Rideout 73aa996444 VulkanPipelineCache: add a descriptor set arena.
This fixes the "descriptor set fragmentation" error that we would see on
Mali.

The pipeline cache now maintains an arena of descriptors that can be
re-used. We call this an "arena" to avoid confusion with
VkDescriptorPool.

Descriptors are returned to the arena only when they are not in use
by any pending command buffer. This allows them to be mutated safely
without worrying about synchronization.
2021-05-12 16:48:59 -07:00
Ben Doherty 08769ec35e Fix DIST_DIR setting for Windows builds (#3945) 2021-05-12 11:15:10 -07:00
Philip Rideout 3aa18eafb3 VulkanPipelineCache: refactor and simplify.
The API of the pipeline cache is now easier to use. Internally, it now
maintains separate pipeline and descriptor bindings for each command
buffer, since that's how Vulkan works.
2021-05-11 12:46:48 -07:00
Philip Rideout 8d4a0e5aa9 Vulkan: fix uninitialized cmd buffer handle. 2021-05-11 11:03:17 -07:00
Ben Doherty e8183d09c2 Fix MissingRequiredAttributes backend test with Metal (#3943) 2021-05-11 10:49:47 -07:00
Philip Rideout 5f1da1dfc0 VulkanDriver: Misc cleanup.
This cleanup is being done in preperation for a new descriptor set
strategy.
2021-05-10 18:26:12 -07:00
Philip Rideout c1c5776439 Serialization: enforce correctness for bool.
If expecting a bool and receiving anything other than true or false,
this is invalid and should fail. This change triggered a unit test
failure which uncovered several actual problems.
2021-05-10 13:27:41 -07:00
Mathias Agopian da418fc7f2 fix another serialization bug 2021-05-10 12:15:52 -07:00
Philip Rideout fcaae825b7 Repair WebGL and fix potential INVALID_OPERATION.
We should take care not to call glVertexAttribPointer when there is
no bound ARRAY_BUFFER (i.e. when its binding is zero).

This fixes the black screen seen with some WebGL samples after
the recent memory leak fix related to the new BufferObject API.
2021-05-10 12:13:00 -07:00
Philip Rideout f5ee074674 Remote UI: fix lensFlare serialization. 2021-05-10 12:11:25 -07:00
Mathias Agopian 0c787b94b8 update remote ui 2021-05-10 11:22:55 -07:00