Commit Graph

5372 Commits

Author SHA1 Message Date
Benjamin Doherty
a0af84d034 Some more shader changes 2022-11-14 21:56:50 -08:00
Benjamin Doherty
3cdaf3feeb ShadowMapManager.h changes 2022-11-14 17:18:00 -08:00
Benjamin Doherty
da7d1b6fa9 Update Scene.cpp 2022-11-14 17:09:55 -08:00
Benjamin Doherty
3129226839 Fix literal 0 2022-11-14 17:07:55 -08:00
Benjamin Doherty
6935acafff Changes to ShadowMapManager 2022-11-14 17:07:25 -08:00
Benjamin Doherty
d8103f4fd6 Update ShaderGenerator.cpp 2022-11-14 16:55:50 -08:00
Benjamin Doherty
09a13f4015 Some shadowing changes 2022-11-14 15:25:08 -08:00
Benjamin Doherty
e888023102 Some shader changes 2022-11-14 15:00:09 -08:00
Benjamin Doherty
f62f4736f0 Adjust LightsUib 2022-11-14 13:39:08 -08:00
Benjamin Doherty
a378272d56 Remove some more uniforms 2022-11-14 13:34:26 -08:00
Benjamin Doherty
3d61938fcf Remove lightFromWorldMatrix from PerViewUniforms 2022-11-14 13:30:54 -08:00
Benjamin Doherty
a9f3937da6 Trivial changes 2022-11-14 13:05:52 -08:00
Mathias Agopian
2dc8d6bcc0 minor cleanups, comment fixes
- update comments
- remove unused or unneeded methods
2022-11-08 15:25:33 -08:00
Balazs Vegh
08dc398452 Fix skipped depth bias set on Metal (#6276) 2022-11-07 11:26:53 -08:00
Benjamin Doherty
cd180c9a44 Update Python requirements.txt to fix CI 2022-11-04 11:35:10 -07:00
daemyung jang
0a7fe52124 Trim a whitespace (#6272) 2022-11-04 08:36:36 -07:00
Mathias Agopian
b71faf47cc fix shadow cascades
breakage was due to an uninitialized variable at the beginning of the
frame, caused by a recent change.

shadows would disappear when cascades were used with 'stable' shadows.
2022-11-03 13:48:09 -07:00
Ben Doherty
67babceb73 Fix backend_test to work with Metal arg buffers (#6135) 2022-11-03 11:04:29 -07:00
Ben Doherty
8e13fc86d5 Expose missing ColorGrading::Builder methods to JS (#6262) 2022-11-03 11:04:06 -07:00
Mathias Agopian
351c8e0972 fix spotlight attenuation
Spotlight attenuation was computed only when shadowing was enabled.
2022-11-03 10:34:39 -07:00
Benjamin Doherty
dc44e20be0 Fix RELEASE_NOTES 2022-11-03 09:57:21 -07:00
daemyung jang
e64b498d6e Update a comment about the range of morph target weight (#6265) 2022-11-03 09:19:01 -07:00
Mathias Agopian
31ab4a13c9 fix recently introduced crash on init
certain material properties can only be set if supported by the 
material.
2022-11-01 13:23:52 -07:00
Benjamin Doherty
e9728dcc8d Fix iOS build 2022-11-01 15:03:44 -04:00
Mathias Agopian
40a3644086 Reduce the size of ShadowMap to 40 bytes from 2KB+
ShadowMap had recently inflated due to its internal use of 
PerViewUniforms, which keeps a shadow copy of the uniform data. This
copy is not needed for ShadowMaps.
2022-11-01 11:58:28 -07:00
Mathias Agopian
41ef71abdf Add MaterialInstance getters for overridable properties (#6243)
In addition to the new getters, this change fixes the duplication of
a MaterialInstance, which didn't carry along the following states:
  - alpha mask threshold
  - specular AA threshold
  - specular AA variance
  - double sidedness

TODO: stencil state, polygon offset and scissor are stil not queryable
2022-11-01 11:22:01 -07:00
daemyung jang
3b40e52c98 Recompute bounding boxes with morph targets (#6246)
* Recompute bounding boxes with morph targets

* Reduce the number of heap allocation while recomputing bounding boxes

Co-authored-by: Romain Guy <romainguy@curious-creature.com>
2022-11-01 11:20:28 -07:00
daemyung jang
de8c7969f3 Return the correct permit type corresponding to the component type (#6255) 2022-11-01 11:03:27 -07:00
Benjamin Doherty
f2c049222b Release Filament 1.28.2 2022-11-01 13:01:13 -04:00
Ben Doherty
be30ac1fcb Fix G3 reported ubsan warning (#6257) 2022-11-01 12:50:27 -04:00
Ben Doherty
c5cc7fe26a Metal: generate argument buffer structures ourselves (#6242) 2022-11-01 12:44:42 -04:00
Ben Doherty
d04b0a5c73 Update Vulkan headers to v1.3.232 (#6256) 2022-11-01 12:38:23 -04:00
Mathias Agopian
72ab2aef0a fix UBO handle leak with ShadowMap
This wasn't a big issue because the "leak" would be cleaned when the
engine is destroyed.
2022-10-31 11:29:46 -07:00
Koncz Levente
1527bb7ad3 Preserve iOS stack traces (#6240) 2022-10-31 13:58:31 -04:00
daemyung jang
8cb26fc9ac Fix a build error on Android
The size of struct could be different on each architecture.
2022-10-30 20:52:56 -07:00
Matt Vera
c21794d0a0 Add Vulkan GGP platform. (#6235)
* Add GGP vulkan platform.

* Add release note for GGP support
2022-10-28 11:53:29 -07:00
daemyung jang
1a6338569a Calculate primitive's AABB correctly (#6232)
AABB of morph target is displacement data so it should be added to
primitive's base AABB.

Co-authored-by: Mathias Agopian <mathias@google.com>
2022-10-28 11:51:02 -07:00
Mathias Agopian
c5ebe1a88a skip primitives with FRONT_AND_BACK face culling 2022-10-28 11:50:21 -07:00
Mathias Agopian
a3f2028ae4 Reduce the size of PerViewUniforms by 24 bytes
This seems a bit pointless because PerViewUniforms has a 2KB field,
however, it adds up now that it's used by ShadowMap.
2022-10-28 11:49:55 -07:00
Mathias Agopian
c393ee4591 Each shadowmap now manages its own UBO
Instead of constantly reusing the View's UBO, each shadowmap now
manages it own. All UBOs for all shadow maps are updated together, 
then later during rendering, we're simply binding the correct UBO.
This change will be needed later so that we can update several
shadow maps in a single texture.

There are two main changes to achieve this:
1. ShadowMap now has PerViewUniforms object
2. For point lights, each face now has a ShadowMap object

One consequence is that ShadowMap is now very large (over 2KB). This
will be addressed later.
2022-10-28 11:49:55 -07:00
Mathias Agopian
83a82ae10e shadowing: store Executor instead of whole RenderPass
We didn't need to store the actual RenderPass for each shadowmap pass,
the executor is enough. This might prevent some mistakes later.
2022-10-28 11:47:12 -07:00
daemyung jang
676694e458 Fix glTF breaking issue (#6239) 2022-10-28 09:56:01 -07:00
Mathias Agopian
2ca218928f utils: get rid of GrowingSlice
it's just not used anywhere. change the implementation of Slice<> to
use two pointers.
2022-10-27 22:48:45 -07:00
Philip Rideout
776ce223fc Fix incorrect Vulkan documentation wrt layouts. 2022-10-26 19:18:32 -07:00
Philip Rideout
0d4d1f55c9 Updates to the Vulkan architecture doc. 2022-10-26 19:18:32 -07:00
Romain Guy
d6dba71ace Update docs 2022-10-26 12:28:56 -07:00
Mathias Agopian
61ee11ae6c fix the doubleSided property documentation (#6228)
* fix the `doubleSided` property documentation

* Update Materials.md.html

Co-authored-by: Romain Guy <romainguy@curious-creature.com>
2022-10-26 12:28:03 -07:00
Mathias Agopian
90f32e7277 A basic POT 2D allocator
This 2D allocator only supports power-of-two, square allocations. It
uses a quadtree to store the allocated regions.

The quadtree implementation currently has a fixed depth (templated).

The allocator does a best-fit match, but currently doesn't implement a
free method.
2022-10-26 11:02:17 -07:00
daemyung jang
b85d9afdb3 Remove an useless whitespace (#6226) 2022-10-26 00:10:33 -07:00
Mathias Agopian
4297d43d9a more improvements to RenderPass
- RenderPass::Executor now only executes the commands, it doesn't 
  create a backend render pass anymore. This is still done in the
  RenderPass::execute() helper.

- scissor and poloyon offset overrides are now set on Executor because
  they are not needed to generate the commands.
2022-10-25 14:38:56 -07:00