Commit Graph
262 Commits
Author SHA1 Message Date
Benjamin Doherty d9f800454c Bump version to 1.9.20 2021-04-05 11:14:17 -07:00
Benjamin Doherty 491e8032e6 Release Filament 1.9.19 2021-04-05 11:10:20 -07:00
Philip Rideout b95d91a65e WebGL: expose fitIntoUnitCube to JS. 2021-04-04 21:38:08 -07:00
Philip Rideout c2fabbf9d9 WebGL: support for multiple <canvas> elements.
We now annotate the JS wrapper for Engine with a GL context handle.

This is fairly hacky because emscripten hides its internal GL object
from JavaScript, and it does not provide a mechanism to pass JS objects
into inline assembly.
2021-04-02 14:29:48 -07:00
Philip Rideout ded542a543 Introduce BufferObject API.
NOTE: after Metal and Vulkan support lands, we can potentially simplify
the Driver API by removing some of the old VertexBuffer entry points.

This introduces a new API-level object called `BufferObject`, and a new
backend-level object called `HwBufferObject`. This encapsulates a single
VBO. It's especially useful when clients need to share data between
multiple VertexBuffer objects. (e.g. for morphing).

In the future, buffer objects could perhaps be used for non-vertex data
(e.g. for compute).

The existing `VertexBuffer` class can now be configured to use buffer
objects by calling `enableBufferObjects` on the builder. By default its
API is unchanged. If buffer objects are enabled, then clients should use
`setBufferObjectAt` (which takes a buffer object) rather than
`setBufferAt` (which takes CPU data).

OpenGL is the trickiest backend for this, due to existence of VAOs.
The implementation in this PR uses a version-tracking scheme to
figure out when to update the VAO.
2021-04-01 14:52:06 -07:00
Mathias Agopian 385a17b8a5 DoF: add many user settings
- native/half resolution
- gather kernel ring counts
- circle-of-confusion radius clamps
2021-04-01 14:42:10 -07:00
Philip Rideout 3161f6a8f1 Remote UI now handles keyboard input. 2021-03-30 08:15:01 -07:00
Philip Rideout a0e7c26a63 Remote pip lockfile from web docs generator. 2021-03-29 14:49:12 -07:00
Benjamin Doherty 83ba56d3e7 Release Filament 1.9.18 2021-03-29 11:05:44 -07:00
Mathias Agopian acb2da7759 Improvements to Camera APIs (#3701)
* move the focus distance from DofOptions to Camera

The DofOption parameter is now deprecated, but will still work if the
focus distance is not set on Camera.

* A few new helper APIs on Camera

- getFocalLength() which returns the focal length used internally for
  DoF computations.

- computeEffectiveFov() and computeEffectiveFocalLength() which can be
used to better simulate a real camera's FOV changes with the
focus distance.

Modified gltf_viewer so it uses the effective fov/focallendth when
DoF is active.

* simplify setLensProjection

We can call setProjection directly instead of converting to a fov
first, which ends up performing atan(tan(x)).

Also improve parameters names.
2021-03-25 15:22:19 -07:00
Mathias Agopian 4de1b0de2d DoF: add a "filter" parameter to the DoF settings
Currently the only NONE and MEDIAN are available options, at some 
point we may add a "MAX" option which is cheaper.

There is no real practical uses for this option with these only two
choices, other than for debugging.
2021-03-23 17:27:31 -07:00
Benjamin Doherty 07140cf2fa Release Filament 1.9.17 2021-03-22 10:16:02 -07:00
Benjamin Doherty 240d9d0919 Release Filament 1.9.16 2021-03-15 10:11:11 -07:00
Philip Rideout 11e3eff009 Update TypeScript bindings. 2021-03-11 10:28:44 -08:00
Philip Rideout 1b3684933d Repair WebGL build. 2021-03-10 16:01:29 -08:00
Philip Rideout c4ac8a9f06 AutomationEngine can now be used as a remote control. 2021-03-08 10:32:06 -08:00
Philip Rideout b554a68186 Remote page now has UI and pushes settings. 2021-03-08 10:32:06 -08:00
Philip Rideout b7ad20249d Improve the Settings serialization API, expose to JS.
This not only makes it easier to expose to JavaScript, it also paves the
way for a much more efficient implementation.
2021-03-08 10:32:06 -08:00
Philip Rideout 65f4b600bc Polish up the Remote Control page. 2021-03-08 10:32:06 -08:00
Philip Rideout 03945b88c8 ImGuiHelper now manages the UI camera. 2021-03-08 10:32:06 -08:00
Philip Rideout 24583332a2 Add filagui and SimpleViewer to the WASM build. 2021-03-08 10:32:06 -08:00
Benjamin Doherty 7fd5b65f3b Release Filament 1.9.15 2021-03-08 10:05:56 -08:00
Benjamin Doherty cb7f81ccd6 Release Filament 1.9.14 2021-03-01 11:10:46 -08:00
Benjamin Doherty ce2c49217f Release Filament 1.9.13 2021-02-22 10:29:02 -08:00
Benjamin Doherty 939f3b975c Release Filament 1.9.12 2021-02-16 10:43:06 -08:00
Philip Rideout 0f9cee0b83 Update WebGL demos on website.
This includes an important fix for Chrome on Windows, which does not
support RGB16F.
2021-02-09 11:41:09 -08:00
Benjamin Doherty ad90fa1183 Release Filament 1.9.11 2021-02-08 09:54:27 -08:00
Benjamin Doherty 6eec2cde81 Release Filament 1.9.10 2021-02-01 11:44:33 -08:00
Philip Rideout c84036c8c4 Update JavaScript bindings and demo to prep for Bloom workaround. 2021-01-26 13:18:03 -08:00
Benjamin Doherty 1e501eb00b Release Filament 1.9.9 2020-11-16 12:32:38 -08:00
Benjamin Doherty bd9aba35f6 Release Filament 1.9.8 2020-11-09 09:27:06 -08:00
Benjamin Doherty 8b8d563b0f Bump version to 1.9.7 2020-11-02 11:00:09 -07:00
Philip Rideout 70dba2398e gltfio: add createInstance() to AssetLoader.
Note that this API is on the loader rather than the asset. This is
because the loader knows how to create Filament entities by traversing
a cgltf node hierarchy.

Animation on dynamically added instances is not yet supported.

We did not add destroyInstance() because gltfio favors flat arrays for
long term storage of entity lists and instance lists, which would be
slow to shift. We also wish to discourage create/destroy churn since it
is more efficient to pre-allocate instances and selectively add them
into the scene.

Fixes #3137.
2020-11-02 09:47:14 -08:00
Benjamin Doherty 4270384661 Bump version to 1.9.6 2020-10-26 11:27:08 -06:00
Philip Rideout 7260bab7b3 Fix TypeScript binding for TextureUsage. 2020-10-20 14:09:05 -07:00
Benjamin Doherty de75b9d125 Bump version to 1.9.5 2020-10-19 11:49:57 -06:00
Benjamin Doherty 40e10817dd Bump version to 1.9.4 2020-10-12 11:52:49 -06:00
Benjamin Doherty d72d3533e6 Bump version to 1.9.3 2020-10-05 11:34:19 -06:00
Benjamin Doherty 42733c10b7 Bump version to 1.9.2 2020-09-28 11:34:32 -06:00
Philip Rideout 5549adc020 JavaScript bindings: fix TextureUsage bitmask.
There's no really good solution, so this just keeps it simple and makes
is so that embind consumes an integer rather than an embind enum object.

Tested by hacking _createTextureFromImageFile.

Fixes #3028.
2020-09-24 15:53:20 -07:00
Benjamin Doherty 35ace36b7d Bump version to 1.9.1 2020-09-21 11:02:11 -06:00
Pixelflinger dc16eb04f8 rename .blurScale to .cocScale in dof options
.blurScale was in fact a scale factor applied to the circle of
confusion (which makes it indeed a "blur scale", but let's use
a more precise language here). 

Update comments to show how to  use .cocScale to control the DoF
effect independently from the camera aperture, which can be useful for
artistic reasons.
2020-09-14 22:22:52 -07:00
Benjamin Doherty 38d37d0d59 Bump version to 1.9.0 2020-09-14 11:07:22 -07:00
Yadikaer Yasheng c529a511f5 typescript defs for Texture & RenderTarget APIs (#3008)
* typescript defs for Texture &   RenderTarget APIs

* suggest to use helper functions to create textures
2020-08-26 18:52:07 -07:00
Philip Rideout 3258972e0e WebGL: repair beginFrame() bindings.
This regressed when we added a callback argument, because the callback
cannot be bound.

This commit also modifies the helmet example to use the low-level API
for testing purposes.

Note that this omits the optional nanoseconds argument. JavaScript
does not support overloading and this argument probably cannot be
accurately provided anyway in a web environment.

Fixes #3002.
2020-08-25 17:24:04 -07:00
Philip Rideout 7ca281d2b9 Expose ShadowOptions to JS, fix #2958. 2020-08-18 09:44:55 -07:00
Ben Doherty faa785f3f6 Switch to C++17 (#2940) 2020-08-12 15:21:39 -07:00
Philip Rideout 732a6c08de Add Texture getters to IndirectLight and Skybox.
Fixes #2851.
2020-08-07 11:49:24 -07:00
Philip Rideout c7c1c01a0e JavaScript: fix typo in clearAssetCache. 2020-08-06 16:47:29 -07:00
Philip Rideout 827e73b682 JavaScript: add clearAssetCache helper. 2020-08-06 16:41:35 -07:00