Commit Graph

6484 Commits

Author SHA1 Message Date
Benjamin Doherty
a76eacba67 Merge branch 'rc/1.43.0' into release v1.43.0 2023-09-18 14:22:06 -07:00
Benjamin Doherty
ee31ca6fc0 Fix RELEASE_NOTES version 2023-09-18 14:20:30 -07:00
Benjamin Doherty
7dd6686087 Correct version to 1.43.0 2023-09-18 11:07:05 -07:00
Powei Feng
fdffd93949 vulkan: fix fence deadlock (#7173)
Should only reset fences in VulkanCommands::gc
2023-09-14 17:11:49 -07:00
Powei Feng
f0a0a9b2e1 Bump version to 1.42.3 2023-09-13 23:05:11 -07:00
Powei Feng
e743e9243f Merge branch 'rc/1.42.2' into release v1.42.2 2023-09-13 22:59:52 -07:00
Powei Feng
c80fbfdf17 Release Filament 1.42.2 2023-09-13 22:59:33 -07:00
Powei Feng
d4d03e4a35 vulkan: reset fences instead create/destroy (#7169)
We allocate all the fences beforehand to reduce calls to
vkCreateFence.

Also remove blocking code in `getFenceStatus` since there is
not a usecase that would require that.
2023-09-13 21:17:31 -07:00
Ben Doherty
2114995489 Implement setMinMaxLevels for Metal (#7158) 2023-09-13 12:33:10 -07:00
Powei Feng
ec30ddd2fb vulkan: implicitly free command buffers (#7167)
We were calling vkFreeCommandBuffers directly, but resetting
the buffers implicitly (when vkBeginCommandBuffer is called)
seems to be a lot more performant.

Also, cleaned up destructor for VkBuffer to no longer require
a separate terminate() method.
2023-09-13 11:21:04 -07:00
Mathias Agopian
c35a60808c repair ShadowOptions::shadowFar
the shadow far plane (shadowFar) was only partially taken into account
2023-09-13 10:29:05 -07:00
Eliza Velasquez
58017a0e6a Tweak documentation
This is admittedly a very nitpicky change.

For most of the changes, I went through the various Markdown files and added
language names to the source blocks for better syntax highlighting on GitHub. It
also makes it easier to copy and paste commands without copying the leading `$`.
I avoided changing anything in `third_party`.

Additionally, I added some instructions for compiling the Android samples on the
command line and fixed some typos.
2023-09-12 20:28:46 +00:00
mackong
d9c2893976 Fix possible change of scale sign when decomposing matrix (#7138)
Co-authored-by: Mathias Agopian <mathias@google.com>
2023-09-12 12:28:02 -07:00
Mathias Agopian
1ff0a2dd6d Improvements to shadowing
- use the geometric normal to apply the shadow bias. This affects
  cascades > 0 and spot/point lights.

- use the scene's origin as a reference point for stabilizing the
  shadowmap, this is more robust.

- clamp directional shadowmap correctly to the 1-texel border, which
  needs to be reachable, as it is a valid value.

- don't snap the shadowmap to texel boundaries if stable mode is not
  active (before we only didn't do it based on lispsm). Stable mode can
  make the shadow unstable when both the camera and the scene move 
  together, so it's better to have a more predictable API where
  "stable" mode means that the snapping occurs and doesn't otherwise.

- add "far origin" distance slider to the debug ui

FIXES=[299310624]
2023-09-12 10:14:21 -07:00
Mathias Agopian
da96b45827 apply shadow settings to all lights in the scene
this "fixes" point light shadows in gltf_viewer, which were never
enabled
2023-09-12 10:08:07 -07:00
Powei Feng
8e13d53b1e vulkan: fix swapchain leak (#7161) 2023-09-11 23:23:04 -07:00
Powei Feng
9ac4fa63ed vulkan: fix swapchain leak (#7161) 2023-09-11 23:21:52 -07:00
Ben Doherty
ff274c8387 Fix incorrect SamplerParams operators (#7150) 2023-09-11 22:47:25 -07:00
Jacob Su
8d621561f3 fix ios samples missing functional header (#7153) (#7154)
1. ios sample: ios/samples/hello-gltf;
2. ios sample: ios/samples/hello-pbr;
2023-09-11 16:25:06 -07:00
Ben Doherty
2c63a5ad7a Fix use of -Wno-deprecated-register flag and MSVC (#7156) 2023-09-11 13:40:02 -07:00
Ben Doherty
d328b64dce Only call .put if the tick op was canceled (#7152) 2023-09-11 12:58:29 -07:00
Ben Doherty
3ab7780c38 Fix incorrect SamplerParams operators (#7150) 2023-09-08 13:06:52 -07:00
Mathias Agopian
6fd5d45295 fix shadow stability when eye is far from world origin
in stable mode the scale was ever so slightly varying with the 
camera position, because it was calculated from the camera frustum in
world-space, this variation was amplified when the camera is far from 
the origin, which eventually caused the modulo needed for snapping the
shadowmap projection to widely vary, leading to the instability.

We now calculate the camera frustum sphere in view space, which is
guaranteed to be constant. If "shadow caster mode" is chosen, we 
quantize the scale a little bit so it stays constant.

The snapping code itself has been cleaned.
2023-09-08 11:19:19 -07:00
Benjamin Doherty
e08e1c209b Bump version to 1.42.2 2023-09-07 17:59:26 -07:00
Benjamin Doherty
de310ed9ad Merge branch 'rc/1.42.1' into release v1.42.1 2023-09-07 17:55:24 -07:00
Benjamin Doherty
4f11a02889 Release Filament 1.42.1 2023-09-07 17:54:47 -07:00
Ben Doherty
a57225cf2e Fix race condition in ShaderCompilerService (#7147) 2023-09-07 17:46:45 -07:00
Romain Guy
dc818abadc Quiet popd/pushd 2023-09-07 14:48:11 -07:00
Jacob Su
c808d8f260 More robust validation in build.sh 2023-09-07 09:42:48 -07:00
Mathias Agopian
e0a37de1ba cleanup 2023-09-07 00:09:02 -07:00
Mathias Agopian
4e2a791e81 Directional shadows can now be transformed
This setting only exists for artistic reasons.

b/297095805
2023-09-07 00:09:02 -07:00
Romain Guy
60627f836f Update cmgen README 2023-09-06 09:07:40 -07:00
Romain Guy
22c9d350c1 Fix docs 2023-09-06 08:45:45 -07:00
Ben Doherty
d11a782c3e Set CMAKE_OSX_DEPLOYMENT_TARGET in CMakeLists.txt as opposed to build.sh (#7143) 2023-09-05 17:46:19 -07:00
Powei Feng
b4a45f126a vulkan: fix ordering when using debugMarkerExt (#7141) 2023-09-05 16:23:09 -07:00
Mathias Agopian
35a8e73675 remove Program operator=
It is currently not needed, AFAIK, and it was not implemented properly.
2023-09-05 12:19:37 -07:00
Jacob Su
8d7743ce67 Bug: fix underscores literal operators c++ compatible error. (#7136) 2023-09-05 10:03:51 -07:00
mackong
682585be4a Fix TextureFlags for sheenRoughnessMap (#7139) 2023-09-05 10:00:12 -07:00
Romain Guy
9046d04de4 Fix a crash in gltfio when not using ubershaders (#7135) 2023-09-02 12:45:58 -07:00
Powei Feng
d01b29fa01 vulkan: properly set bool spec onst (#7125)
We wrote a bool directly into 4 bytes (as the first byte). This has two issues:
 - the other 3 bytes are not initialized
 - should be writing VK_TRUE/FALSE instead
2023-09-01 14:17:18 -07:00
Mathias Agopian
8cba3d4366 Revert "workaround another PowerVR compiler bug "
This reverts commit 58f96be2c4.

This caused material files to increase in size significantly. It turns
out that glslang has to generate a copy for each parameter that is
passed to a function as a non-const parameter.


This revert will break IMG devices again, but that should be the case
only on debug builds. Release builds lose the const qualifier by 
virtue of going through spirv. We'll try to address this some other 
way later.
2023-09-01 14:16:59 -07:00
mackong
0f21c6c90b Use flatmat for mat parameters (#7131)
Co-authored-by: Romain Guy <romainguy@curious-creature.com>
2023-09-01 12:39:07 -07:00
Powei Feng
cc6a6454d7 vulkan: properly set bool spec onst (#7125)
We wrote a bool directly into 4 bytes (as the first byte). This has two issues:
 - the other 3 bytes are not initialized
 - should be writing VK_TRUE/FALSE instead
2023-09-01 10:59:30 -07:00
Romain Guy
609dc97c4a Remove warnings 2023-08-31 11:58:06 -07:00
Benjamin Doherty
87351097ad Adjust NEW_RELEASE_NOTES to reflect cherry-picks 2023-08-30 16:30:10 -07:00
Ben Doherty
be1e51ad91 Update FrameCompletedCallback using directive (#7128) 2023-08-30 16:29:28 -07:00
Ben Doherty
29ce1cad84 Transition setFrameCompletedCallback to take a CallbackHandler (#7103) 2023-08-30 16:28:53 -07:00
Ben Doherty
6a967ad007 Make destroyFence asynchronous (#7127) 2023-08-30 16:28:36 -07:00
Ben Doherty
694766682f Update FrameCompletedCallback using directive (#7128) 2023-08-30 16:26:15 -07:00
Ben Doherty
c946ebd1e6 Make destroyFence asynchronous (#7127) 2023-08-30 16:22:37 -07:00