Commit Graph
48 Commits
Author SHA1 Message Date
Benjamin Doherty 08503943f4 Update web docs 2023-04-17 13:29:47 -04:00
Romain Guy 327f630ed7 Update web demos 2023-03-24 09:38:42 -07:00
Ben Doherty 3c794247c3 Update web docs (#6645) 2023-03-17 00:34:39 -07:00
Romain Guy d6dba71ace Update docs 2022-10-26 12:28:56 -07:00
Romain Guy 0ecf5118ba Update docs 2022-09-14 20:18:27 -07:00
Romain Guy 59e9f36e25 Update docs for sampler2D arrays 2022-08-03 16:08:28 -07:00
Romain Guy f78d131015 Updates docs 2022-05-10 08:31:58 -07:00
Romain Guy 700b4d5d38 Update docs and readmes 2022-01-18 16:54:31 -08:00
Romain Guy de1281dd9f Be more specific about anisotropyDirection 2021-12-06 15:37:41 -08:00
Romain Guy 91b5cc4bea Fix inverse tone mapping issues (#4437)
Bring color grading back into the Rec.709 color space to match
previous behaviors. This change also implements an exact inverse
tone map function for the "Filmic" operator.
2021-08-02 18:53:35 -07:00
Romain Guy 5c0da86e04 Fade specular AO from bent normals at grazing angles (#4411)
This helps prevent over-darkening but it's an artistic hack.
We need to check how we compute the bent normals as it seems we
find occlusion where there is no occlusion. The effect is
particularly visible on clear coat materials like a car's body.
2021-07-30 16:02:12 -07:00
Romain Guy 5a61d28eee Add Java bindings for transparent shadow (#4272)
* Add Java bindings for transparent shadow

* Fix JNI binding typo

* Fix typo
2021-07-08 12:50:18 -07:00
Romain Guy 9bd3684893 Add support for transparent shadows (#3298)
* Add support for transparent shadows

This solution uses an 8x8 Bayer matrix. We could find a better
noise. We also need better filtering of the shadow maps. A PCF
is barely enough and VSM fails without blurring.

* Use a fixed Bayer matrix, fix pre-caching of depth shaders

* Use gradient noise instead of fixed bayer pattern

* Update docs
2021-07-08 10:31:52 -07:00
Romain Guy 7f2a189641 Update docs 2021-07-07 13:50:37 -07:00
Romain GuyandPhilip Rideout 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
Romain Guy f5adbbddb8 Fix typo 2021-04-27 20:33:58 -07:00
Ben Doherty 03d74f1313 Update web docs, add note about shadowMultiplier (#3855) 2021-04-26 12:05:25 -07:00
Romain Guy 4ad947f0ad Update docs 2021-02-12 10:54:54 -08:00
Romain Guy 9da69dac46 Update documentation 2021-02-09 10:43:49 -08:00
Romain Guy dc2d55c409 Update static documentation 2021-01-14 10:29:38 -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
Romain Guy 058c9cd28b Update docs 2020-08-07 10:55:11 -07:00
Romain Guy 56682794d3 Update getTime() documentation 2020-06-16 13:14:48 -07:00
Romain Guy 6a0a2d965e Update documentation 2020-05-09 15:13:25 -07:00
Romain Guy ddef5ec3c4 Change how emissive works (#2415)
Emissive was previously defined in exposure compensation stops, which
was confusing to many. It is now a value in nits, with the alpha
channel controlling how much the camera exposure affects the emissive.
At 0, the emissive value is just added to the final pixel color, at
1 the emissive value is multiplied by the exposure just like with
regular lights.

The intensity of the emissive property can be computed from an
exposure value (EV) easily with the following formula:

emissive.rgb = emissive.rgb * pow(2.0, EV - 3.0);

This formula is available as Exposure::luminance(float) already
in Filament.
2020-04-17 17:42:21 -07:00
Romain Guy bf0dc32ee3 Change specularAmbientOcclusion from boolean to enum (#2352)
The user can now choose amongst 3 specular AO methods:
- None, specAO is off
- Simple, specAO is inferred from roughness and diffuse AO
- Bent normals, specAO is computed accurately from cone intersections

The last method is more expensive but produces the best results.

This change also fixes a few issues:
- Rename materialRefraction() and materialRefractionType() for
  consistency
- Fixes user time in shaders
2020-04-07 09:19:48 -07:00
Romain Guy e6500a8b3b Update web docs 2020-03-31 18:07:40 -07:00
Ben Doherty af47fa9b6d Fix incorrect twoPassesOneSide rendering with Metal (#2133) 2020-02-13 17:32:26 -08:00
Romain Guy 46090793a8 Fully document refraction properties 2020-02-05 17:45:03 -08:00
Romain Guy 503e66790b Docs fixup 2020-01-30 17:52:39 -08:00
Romain Guy a8dc91c238 Update static version of Materials.md.html 2020-01-30 17:46:46 -08:00
Romain Guy 8380a87a6e Update HTML docs 2020-01-05 11:44:45 -08:00
Romain Guy 564e527ac7 Fix docs typo 2019-12-05 10:17:00 +01:00
Romain Guy b0d116632c Add the ability to modify clip space coordinates in the vertex shader (#1704)
* Add the ability to modify clip space coordinates in the vertex shader

This introduces MaterialVertexInputs.clipSpaceTransform, a mat4 that
is applied to gl_Position before exiting the vertex stage.

* Address code review comments
2019-09-28 14:15:32 +03:00
Romain Guy 79292481b3 Update documentation 2019-09-26 16:31:55 +03:00
Philip Rideout 89c8e7c51a gltfio: support doubleSided in ubershader mode.
Fixes #1562
2019-08-28 13:01:05 -07:00
Romain Guy 6a8e6d45b5 Improve materials under white furnace test (#1563)
* Improve materials under white furnace test

Two major changes:
- Mobile target now implements a cheaper variant of the off specular
  peak bias (which moves the reflected vector towards the normal).
  This greatly helps with rough surfaces that may otherwise point
  toward a bright part of the IBL.
- The indirect diffuse love is now properly attenuated to avoid adding
  the energy reflected by the specular layer. This allows dielectrics
  to be correctly energy conserving under a white furnace.
- Tweak the (hacky) clear coat layer attenuation to behave properly
  under a white furnace.

* Use the same reflected vector modification everywhere
2019-08-28 10:39:57 -07:00
Romain Guy ac33331fd6 Update documentation to fix typos 2019-08-23 10:58:08 -07:00
Romain Guy 8c299d7b0b Update documentation to fix #1336 2019-06-21 09:29:49 -07:00
Romain Guy e1b773958f Add screen and multiply blending modes (#1241)
* Add screen and multiply blending modes

This change also fixes a sorting issue: different sorting modes
were sorted in different buckets which is incorrect. We want
to sort only by distance.

* Update release notes and Java API

* Fix build error
2019-05-30 10:17:16 -07:00
Romain Guy 0a5c068cb6 Switch specular AA to Tokuyoshi and Kaplanyan (#1218)
This replaces the previous "curvature to roughness" method. Both are related
and rely on the screen space variance of geometric normals but this new
solution offers more control (the screen space variance and the clamping
threshold can be controlled).
2019-05-23 12:56:26 -07:00
Romain Guy 0347fb0441 Add new material properties: specular/multiBounceAmbientOcclusion (#1198) 2019-05-18 14:30:08 -07:00
Romain Guy 23cdb56dcd Update static docs 2019-04-10 12:42:18 -07:00
Romain Guy 724e9abf96 Tweak specularGlossiness 2019-04-09 13:45:07 -07:00
Romain Guy ab12d1d1bb Add postLightingColor property to materials (#1057)
* Add postLightingColor property to materials

This property can be used to modify the color computed in the lighting
passes of the materials. That color is blended with the computed color
according to the postLightingBlending option (add, transparent or opaque).

* Remove test

* Update docs

* Address code review comment

* Switch postLightingColor default blend mode to transparent
2019-03-29 10:02:07 -07:00
Romain Guy 923db48614 Add build command for Markdeep files (#919)
* Add build command for Markdeep files

build.sh -w can now be used to "rasterize" Markdeep .md.html files
to regular, static .html files. These files load faster and do not
suffer from an initial flash of uninitialized content.

This new command requires node, npm and nx to run puppeteer to
"rasterize" the Markdeep documents. This should eventually be
integrated in the actual build system to automatically re-generate
the HTML files when the Markdeep documents are edited.

* Remove unnecessary .gitignore file

* Change constant names for JS docs
2019-03-04 14:23:05 -08:00