Commit Graph

222 Commits

Author SHA1 Message Date
Romain Guy
7f2a189641 Update docs 2021-07-07 13:50:37 -07:00
Philip Rideout
f4558fee1d Update remote UI. 2021-06-30 09:44:05 -07:00
Philip Rideout
eb483281dc Update remote control web app. 2021-06-28 15:10:50 -07:00
Mathias Agopian
19c7949cc4 update remote ui 2021-06-25 17:32:19 -07:00
Mathias Agopian
e7b90f9c12 update remote ui 2021-06-25 15:18:33 -07:00
Mathias Agopian
0d61d47f28 update remote ui 2021-06-25 13:21:23 -07:00
Philip Rideout
e7ed85ec94 Update WebGL tutorials. 2021-06-16 14:24:47 -07:00
Philip Rideout
5d1d4ff4d6 Update web site with latest WebGL artifacts. 2021-06-16 14:17:12 -07:00
Romain Guy
04ada346b0 Materials can now provide custom lighting/shading (#4142)
* Materials can now provide custom lighting/shading

When a material uses the "lit" shading model, customSurfaceShading can
be enabled to replace Filament's lighting implementation. When this
feature is enabled, the material *must* provide the following function
in the fragment shader block:

    vec3 surfaceShading(
            const MaterialInputs materialInputs,
            const ShadingData shadingData,
            const LightData lightData
    ) {
        return vec3(1.0); // custom lighting here
    }

Please refer to the docs in Materials.html for more information about
this feature and the different values provided by the data structures
passed to the function.

* Update docs

* Update docs/Materials.md.html

Co-authored-by: Philip Rideout <philiprideout@gmail.com>

Co-authored-by: Philip Rideout <philiprideout@gmail.com>
2021-06-16 09:53:58 -07:00
Romain Guy
94ff2ea6b1 Add support for KHR_materials_specular to glTF (#4046)
* Add support for KHR_materials_specular to glTF

* Add support for IOR to ubershaders

* Update release notes

* Remove unused variable, fix comment
2021-05-27 17:33:24 -07:00
Philip Rideout
097fac4cca Add support for drag-and-drop HDR.
This adds Java bindings for IBLPrefilterContext and uses them
in `sample-gltf-viewer`.
2021-05-25 12:46:52 -07:00
Philip Rideout
3500101816 Repair live WebGL demos.
Fixes #4027.
2021-05-25 12:22:05 -07:00
Philip Rideout
2e40bb46e7 Fix minor typos. 2021-05-21 11:34:08 -07:00
Benjamin Doherty
8d8729be8e Remote UI: update viewer with new URL input 2021-05-13 16:46:26 -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
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
Mathias Agopian
c23a7343d4 update remote ui 2021-05-07 16:57:05 -07:00
Mathias Agopian
d1c8d42bd2 update remote ui 2021-05-07 15:19:15 -07:00
Romain Guy
459f70f7b4 Update docs 2021-05-03 17:55:32 -07:00
Romain Guy
f5adbbddb8 Fix typo 2021-04-27 20:33:58 -07:00
Mathias Agopian
036bfa9b20 Materials now have a quality property.
We used to have that before, but it was hardcoded and depended on
mobile vs. desktop.
With this change, users can set the quality on the material itself.
The default match the current settings. There are 3 quality levels:

low: enables optimization that might not be 100% correct 
     (e.g. abs(x) instead of sqrt(x*x))

normal: like low, but doesn't sacrifices correctness.

high: could be improved upsampling, etc...
2021-04-27 14:20:50 -07:00
Romain Guy
9c123a59ab New experimental tone mapper (#3850)
* New experimental tone mapper

The new tone mapper proposed in this change replaces Uchimura (see
below) and is composed of two distinct algorithms:

- The first is the customizable compression curve from Timothy Lotte
  (from GDC 2015). The curve's default parameters were chosen to
  match the overall appearance (contrast) of the ACES curves used
  as our current default tone mapper. This was done to provide a
  good migration path to making this new solution the default in
  a future version of Filament.
  The compression curve can be customized via its contrast, shoulder,
  input middle gray, output middle gray, and maximum "HDR value"
  (scene referred).
  It is important to note that the compression is only applied to
  the luminance of the input scene referred value.
- The second is a novel approach by Troy Sobotka called Exposure
  Value Invariant Luminance Scaling (or EVILS). This solution works
  on the largest chromatic channel of the input value as opposed
  to mapping all RGB channels as we do in our other tone mappers.
  The algorithm effectively scales all channel by a ratio that
  depends on both the compressed luminance from the first stage
  and the luminance of input value normalized by the largest
  channel.

This new solution offers important benefits as it manages to
preserve chromaticity for high input values. It is also designed
to provide a desirable rolloff to white on overexposure. This
means that even without gamut mapping, this solution avoids many
hue skews (red to orange, blue to purple, etc.). The results
provided by this solution are much more natural and make using
other color grading tools much easier.

* Use std::pow instead of pow

* Fix Web builds
2021-04-26 18:09:37 -07:00
Ben Doherty
03d74f1313 Update web docs, add note about shadowMultiplier (#3855) 2021-04-26 12:05:25 -07:00
Mathias Agopian
9914eb84a4 Fix documentation for getNormalizedViewportCoord
Fixes #3821
2021-04-23 22:39:01 -07:00
Philip Rideout
3c09d8784a Minor fixups for drag-and-drop viewer page. 2021-04-15 10:11:05 -07:00
Philip Rideout
09bda8a1dc Add glTF viewer to public website.
This will allow folks to drop a GLB into the following page to get a
WebGL preview. It always uses the latest version of Filament via unpkg.

https://google.github.io/filament/viewer

After the next release we can also use the `<filament-viewer>` component
itself from unpkg and remove the local copy.
2021-04-14 10:42:38 -07:00
Mathias Agopian
9302a2e711 update remote controler 2021-04-06 21:18:18 -07:00
Philip Rideout
4f49cdbd1e Update remote control web page. 2021-04-06 14:17:07 -07:00
Philip Rideout
7d604cd05b Add script that updates remote UI.
This script makes it easy to update the web page at
https://google.github.io/filament/remote/ even if you do not have the
emscripten SDK. It works by downloadinug the latest continuous web
build, then placing the wasm file in the right place.

After running the script, the user must make a git commit to finish the
operation.
2021-04-02 12:34:16 -07:00
Philip Rideout
e19dff18c3 Add JSON unit test, fix ring count output.
Shockingly there were no unit tests that did a simple write-then-read.
This is important because it's easy to forget details such as trailing
commas and the fact that uint8_t is a char.
2021-04-01 21:06:44 -07:00
Philip Rideout
deee5d2815 Update the remote web page. 2021-04-01 18:00:49 -07:00
Philip Rideout
3161f6a8f1 Remote UI now handles keyboard input. 2021-03-30 08:15:01 -07:00
Philip Rideout
4197afba49 Web site: update Filament in /remote. 2021-03-24 08:24:00 -07:00
Philip Rideout
dced766999 Update Remote Control page. 2021-03-10 10:51:19 -08:00
Philip Rideout
61b1542468 Add new remote page to site. 2021-03-08 08:57:57 -08:00
Philip Rideout
50799f3760 Replace QR code page with something better. 2021-03-02 18:36:38 -08:00
Philip Rideout
74aa7d3c87 Add QRCode page for glTF files. 2021-02-28 17:59:53 -08:00
Romain Guy
22d16c1910 Fix typo in docs 2021-02-19 12:04:45 -08:00
Romain Guy
4ad947f0ad Update docs 2021-02-12 10:54:54 -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
Romain Guy
317c82711b Improve docs generation (#3527)
build.sh -w now performs a full install of dependencies instead
of relying on local installation tricks.
2021-02-09 11:40:02 -08:00
Romain Guy
9da69dac46 Update documentation 2021-02-09 10:43:49 -08:00
Ben Doherty
07ddd52dcf Add getVertexIndex API for vertex shaders (#3493) 2021-02-04 12:40:21 -08:00
Romain Guy
dc2d55c409 Update static documentation 2021-01-14 10:29:38 -08:00
Romain Guy
c0b8e98a93 Update documentation to fix broken links 2021-01-14 10:28:56 -08:00
Romain Guy
2895530e09 Add support for sheenColor and sheenRoughness (#3358)
* Add support for sheenColor and sheenRoughness

This work is necessary to support the glTF extension KHR_materials_sheen.
This change effectively adds the specular lobe from the cloth material
model to the base material model. The cloth model remains useful for
its extra subsurface color feature but also because it's cheaper.

* Add support for KHR_materials_sheen to gltfio

* Update documentation

* Document default shading values
2020-12-12 11:07:40 -08:00
Romain Guy
6486eba7e2 Fix typo in docs 2020-11-09 09:37:10 -08:00
Ben Doherty
f31eb09ca0 Add Live Wallpaper Android sample (#3161) 2020-10-06 11:03:55 -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