Commit Graph

49 Commits

Author SHA1 Message Date
Filament Bot
333d01a0a5 [automated] Updating /docs due to commit 24a6bd3
Full commit hash is 24a6bd30f9

DOCS_ALLOW_DIRECT_EDITS
2025-09-19 15:46:12 +00:00
Powei Feng
8233ab1cda Revert "[automated] Updating /docs due to commit 60df8ac"
This reverts commit 656a4b6f32.
2025-09-18 14:40:07 -07:00
Filament Bot
656a4b6f32 [automated] Updating /docs due to commit 60df8ac
Full commit hash is 60df8ac6b8

DOCS_ALLOW_DIRECT_EDITS
2025-09-18 21:32:03 +00:00
Filament Bot
f14ff6606a [automated] Updating /docs due to commit 5628b8b
Full commit hash is 5628b8b6e7

DOCS_ALLOW_DIRECT_EDITS
2025-07-25 23:31:26 +00:00
Filament Bot
c7b919a065 [automated] Updating /docs due to commit 45e74c2
Full commit hash is 45e74c279f

DOCS_ALLOW_DIRECT_EDITS
2025-07-25 23:10:16 +00:00
Filament Bot
eee6fba9a8 [automated] Updating /docs due to commit e893637
Full commit hash is e89363751d

DOCS_ALLOW_DIRECT_EDITS
2025-07-18 21:02:40 +00:00
Filament Bot
8ef7755628 [automated] Updating /docs due to commit 06b0d52
Full commit hash is 06b0d5229a

DOCS_ALLOW_DIRECT_EDITS
2025-07-17 18:00:34 +00: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
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
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
Ben Doherty
f31eb09ca0 Add Live Wallpaper Android sample (#3161) 2020-10-06 11:03:55 -06:00
Romain Guy
54a4545ac5 Update README 2020-04-25 10:37:13 -07:00
Romain Guy
030e97b381 Update screenshots in README.md 2020-04-20 14:56:00 -07:00
Philip Rideout
bee9ab31bc Add new Android demo: sample-page-curl.
Pure Java app that demonstrates custom vertex shader animation and
two-sided texturing.
2020-04-17 11:12:55 -07:00
Philip Rideout
f084e50829 Remove old bloom samples to avoid confusion.
These should not be confused with our core bloom feature. For testing
the RenderTarget API, it would be better to create a small focused demo.
2020-04-02 09:05:36 -07:00
Romain Guy
92b2dd835d Add support for bent normals (#2303)
* Add support for bent normals

Bent normals can be enabled via the bentNormal property of a material.
When specular occlusion is enabled, bent normals improve the quality
of the computation.

* Save a couple of multiplications in bent specular AO
2020-03-29 17:00:03 -07:00
Romain Guy
2f47bab237 Update README screenshots 2020-03-25 14:23:36 -07:00
Romain Guy
46090793a8 Fully document refraction properties 2020-02-05 17:45:03 -08:00
Romain Guy
bc554f77f4 Add documentation for refractive materials 2020-01-30 17:43:21 -08:00
Philip Rideout
9ac17a88b3 Add new sample for glTF models and the camera manipulator.
This differs from the bloom demo in that it supports touch interaction,
has animation, loads from GLTF rather than GLB, and is overall simpler.
2020-01-17 09:09:46 -08:00
Philip Rideout
60ead8c5f3 Add Android sample for testing the Stream API.
This new sample differs from "Hello Camera" in that it exercises all
three ways of using Stream. It also uses Canvas instead of Camera2 to
draw into the external texture. It shows two sets of stripes, one
animated using the shader and the other animated using Canvas. If the
two stripes are aligned, then the stream is perfectly synchronized.
Users can tap the screen to cycle between the three modes.
2019-11-26 07:58:52 -08:00
Philip Rideout
3618f14531 Add Android sample for Camera Stream.
This simple Kotlin app projects a live feed on the side of a cube.
It looks very similar to the `lit-cube` demo but there is a new Kotlin
class called `CameraHelper` that creates Camera2 objects, starts
the capture session, creates the Filament texture, etc.

For now, this app uses SurfaceTexture. This is a starting point and
provides a testing ground for tentative improvements to our Stream API.
2019-10-16 09:05:24 -07:00
Romain Guy
b84117eb92 Update READMEs 2019-06-28 13:51:57 -07:00
Philip Rideout
10dc3a24e8 Add Kotlin sample for gltfio and custom render targets. 2019-06-26 13:55:23 -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
705c1969b2 Add clearCoatIorChange property to materials (#890)
This property can be used to control the darkening of the base layer
due to a change in index of refraction when going through the clear
coat layer.
2019-02-27 10:30:46 -08:00
Romain Guy
4738e93b83 Replace Cloth DFG approximation with DFG LUT
By removing the Fresnel term (often ommitted from fabric/cloth BRDFs)
we can store the DG term for the cloth BRDF in the 3rd channel of the
existing DFG LUT.
2019-02-21 11:44:52 -08:00
Romain Guy
42acac02c0 Update documentation
Add titles and use energy preservation vs conservation to describe
two different concepts.
2019-02-15 09:26:52 +00:00
Romain Guy
0394aeb23b Add specular anti-aliasing properties to materials (#697)
* Add specular anti-aliasing properties to materials

curvatureToRoughness
limitOverInterpolation

These techiques were supposed to be enabled by default on
desktop but it turns out they were broken. They must now
be enabled manually on each material instead (and work on
mobile).

* Update docs/Materials.md.html
2019-01-14 12:25:51 -08:00
Romain Guy
eaf790aaa7 Improve rendering to TextureView (#635)
* Improve rendering to TextureView

UiHelper wasn't calling the resize callback at init time when attaching
to a TextureView, but it was for a SurfaceView. This makes both code
paths consistent and fixes the standard samples if they are modified to
render to a TextureView.

This change also adds a new sample app that shows how to render into
a TextureView.

* Suppress warning

* Suppress another warning
2018-12-13 15:57:15 -08:00
Romain Guy
380e3fa690 Simplify UiHelper API, add transparent rendering sample (#629)
* Simplify UiHelper API, add transparent rendering sample

* Rename the app

* Address review comments

Also use the proper package name
2018-12-13 09:09:09 -08:00
Romain Guy
e6cb4d0dfa Update sample screenshots in README 2018-11-28 11:43:13 -08:00
Romain Guy
55dd612c64 Add screenshots to Android samples' README (#513)
This change also optimizes the size of existing images using squoosh.app.
This should make the main README a lot lighter and faster to load (it saves
several MiBs).
2018-11-21 14:16:21 -08:00
Mathias Agopian
3bf0d6a4ab document artifacts due to giving up mipmaps (#299)
* document artifacts due to giving up mipmaps

- also talk about lod remapping
- try to avoid to confuse alpha with roughness

* fix typos
2018-09-24 16:14:52 -07:00
Mathias Agopian
22f7599e73 Try to clarify the sections about cubemaps (#296)
* Try to clarify the sections about cubemaps

* fix typos and spelling

* don’t mention filament’s APIs by name
2018-09-24 12:54:22 -07:00
Mathias Agopian
0f5e501dda Add images illustrating IBL prefiltering errors. (#268) 2018-09-18 19:08:21 -07:00
Romain Guy
4585b8f896 Add clearCoatNormal property (#131)
* Add clear coat normal map support

This change allows to set a separate normal map for the clear coat layer of a material.

* Document the new clearCoatNormal property

* Fix typo
2018-08-24 08:56:44 -07:00
Romain Guy
f8c87f8f81 Update screenshots 2018-08-22 16:29:32 -07:00
Romain Guy
b86928179b Document energy compensation for multiscattering BRDFs (#121)
* Document better BRDFs

- Document the loss of energy in the specular BRDF
- Start documenting the gain of energy in the diffuse BRDF

* Explain energy compensation with second scaled lobe

* Add multiscattering pre-integration
2018-08-21 15:51:54 -07:00
Romain Guy
50bb3f3530 Add energy conservation/loss images for documentation 2018-08-16 16:44:00 -07:00
Romain Guy
7547cd9ee5 Update images for the documentation 2018-08-15 13:57:48 -07:00
Romain Guy
24dc24ce86 Add explanations about the Fresnel term 2018-08-15 13:13:48 -07:00
Romain Guy
12da05e249 Update docs 2018-08-09 17:41:07 -07:00
Romain Guy
128ab657df Switch cloth model from Ashikhmin NDF to "Charlie" NDF (#53)
* Add new Cloth NDF

Based on the work by Estevez and Kulla, also known as the "Charlie" sheen.

* Restore DFG computation to GGX

* New proposed approximation for Cloth DFG

* Add "Charlie" cloth DFG approximation to cmgen

* Switch to "Charlie" sheen for cloth shading

* Document the new cloth NDF and DFG approximation
2018-08-08 17:22:41 -07:00
Tact Yoshida
ad49986245 Remove execute permissions 2018-08-06 10:36:54 -07:00
Romain Guy
14092f196f Add annex on spherical harmonics to docs 2018-08-04 15:30:31 -07:00
Romain Guy
b6b8ba32cd Add sample images to README.md 2018-08-03 18:12:58 -07:00
Romain Guy
b3d758f3b3 Initial commit 2018-08-03 10:38:22 -07:00