Commit Graph

107 Commits

Author SHA1 Message Date
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
Philip Rideout
fab70e878a Repair redball tutorial.
Our GitHub Pages site is currently using an older version of the
filament wasm file so we should avoid using the new API here.
2019-05-30 09:34:08 -07:00
François Guthmann
b7304084d9 Corrected minor LaTeX typo (#1234)
The Jacobian formula display was broken in the cloth IBL section.
2019-05-25 13:14:35 -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
cabdc255f5 Shader code cleanup
roughness is now called perceptualRoughness and linearRoughness
is now called roughness. It better matches papers, etc.
2019-05-20 14:45:26 -07:00
Philip Rideout
fdefa16cae jsbindings: add setColor4Parameter and rename setColorParam.
JavaScript does not have overloading so we generally use a numeric
suffix to distinguish overloads.

Fixes #1202
2019-05-20 10:43:38 -07:00
Romain Guy
0347fb0441 Add new material properties: specular/multiBounceAmbientOcclusion (#1198) 2019-05-18 14:30:08 -07:00
Philip Rideout
9081a0b657 Add another missing file to site. 2019-04-23 15:14:54 -07:00
Philip Rideout
d87714e4ef Add missing files to web site. 2019-04-23 15:13:24 -07:00
Philip Rideout
45fae716de Update WebGL docs. 2019-04-23 15:04:06 -07:00
Romain Guy
88098f99b9 Fix typo in equation 138 2019-04-16 13:39:24 -07:00
Romain Guy
23cdb56dcd Update static docs 2019-04-10 12:42:18 -07:00
Philip Rideout
77237fd3fa Rename specular-glossiness parameters to their canonical names. (#1086)
* Rename specular-glossiness parameters to their canonical names.

* Remove roughness from MaterialInputs for specular-glossiness.
2019-04-10 07:10:27 -07:00
Romain Guy
724e9abf96 Tweak specularGlossiness 2019-04-09 13:45:07 -07:00
Philip Rideout
37cb9247fd Add new shading model to Filament for specularGlossiness. (#1083)
* Add new shading model to Filament for specularGlossiness.

This adds a shading model based on KHR_materials_pbrSpecularGlossiness.
The corollary gltfio change will be in an upcoming PR.

* Improve documentation for specular-glossiness
2019-04-09 13:22:16 -07:00
Philip Rideout
dcc17b9b7e Allow dynamic doubleSided and materialThreshold. (#1072)
* MaterialInstance now has setMaskThreshold for convenience.

* Materials now support dynamic doubleSided property.

This does not change the format of material packages because they
already have both getDoubleSided() and getDoubleSidedSet().

The only way in which this change could impact existing applications is
that materials that explicity set doubleSided to "false" will now
respect the material's culling mode, rather than forcing it to NONE.

Fixes gltf_viewer with littlest_tokyo in ubershader mode.

Fixes #963.

* JNI for dynamic material properties.

* Add underscore prefix to internal material params.

* Remove un-needed mat info field.
2019-04-08 11:43:01 -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
Philip Rideout
06964a787a Repair parquet and helmet web demos. 2019-03-09 06:39:31 -08:00
Philip Rideout
64f2a580da Update public site with latest JavaScript demos.
It has been a while, we've made a fix to our KTX writer, added a helmet
demo, etc.
2019-03-08 17:49:28 -08:00
Philip Rideout
3c2a6d5f8c Link to rasterized markdown on website. 2019-03-08 09:59:01 -08: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
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
552b1c551f The cloth material model is not more expensive 2019-02-26 14:50:25 -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
6f9df5bfab Update incorrect equations of importance sampling 2019-02-19 17:59:39 -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
François Guthmann
8253006899 Typo correction
Switched arguments in prefilteredDFG_LUT call to align with function definition in the documentation and in the code.
2019-02-08 10:24:15 -08:00
Romain Guy
81a52411ed Clarify Fresnel term for IBL implementation of clear coat 2019-01-25 13:49:44 -08:00
Romain Guy
f3752a42c8 Document UV flipping behavior and add control attribute (#720)
Materials can disbale this behavior by setting flipUV: false
in the header section of the material definition.

Fixes #672
2019-01-17 11:12:16 -08: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
a38c40cf11 Turn on shaders optimization by default (#614)
* Turn on shaders optimization by default

Release builds of Filament only work well with optimize shaders,
turning optimizations on by default will help avoid mismatches.

This change also adds -g to disable all optimizations, for debug
builds.

* Use -g on debug builds

* Use -g on debug builds

* Update tutorial_redball.md to remove matc's -O

* Update tutorial_suzanne.md to remove matc's -O

* Use -g in debug builds
2018-12-11 09:36:37 -08:00
Mathias Agopian
cd00c4bbe8 Add getUserTimeModulo() to materials
This calculates the modulo of the user time by a given value, using
the high precision user time. This is useful for animations without
having to worry about resetting the time.
2018-12-10 21:36:20 -08:00
Mathias Agopian
76b15e895a [MATERIALS BREAK] higher period clock
THIS CHANGE BREAKS MATERIALS.

This adds getUserTime() in shaders/materials, which returns the time
in second since Renderer::resetUserTime() was called.
Two values are provided, the time in second encoded as a float and
the difference between that and the double value, which together allows
to perform high precision time computation when needed.

This change allows longer running animations in materials. Using only
the float value, give millisecond resolution for more than 4h.
2018-12-10 16:28:07 -08:00
Philip Rideout
083a60938e Update web site to v1.1.0 (includes KTX fixes) 2018-12-07 09:43:30 -08:00
Philip Rideout
beaf751604 filamesh: Compress attributes individually.
This further reduces compressed suzanne from 333489 bytes to 272761.

Tested with vk_hellopbr and tutorial_suzanne.html

Issue #558
2018-12-05 17:15:52 -08:00
Romain Guy
e6cb4d0dfa Update sample screenshots in README 2018-11-28 11:43:13 -08:00
François Guthmann
9915ec7841 EV100 formula typo (#543)
Forgot the parenthesis when I corrected it, I'm sorry...
2018-11-28 09:31:13 -08:00
François Guthmann
78804251e9 Corrected typo in formula (#519)
It looks like there is a minus sign missing in there, see https://www.wolframalpha.com/input/?i=(((1%2Bsqrt(x))+%2F+(1+-+sqrt(x)))+-+1.5)+%2F+(((1%2Bsqrt(x))+%2F+(1+-+sqrt(x)))+%2B+1.5)

I'm not sure what the code does though https://github.com/google/filament/blob/master/shaders/src/brdf.fs#L282
2018-11-23 10:09:54 -08:00
François Guthmann
5a402dc6a8 Corrected exposure from ev100 formula (#518)
The new formula should be the correct one according to this document (first line p86): https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
2018-11-22 10:03:29 -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
Philip Rideout
1ed8618cca Refresh website to publish new tutorial. 2018-11-16 17:21:18 -08:00
Romain Guy
0938051579 Fix docs 2018-11-15 16:57:16 -08:00
Vallentin
81e8035cbb Fixed typos (#487) 2018-11-14 09:19:04 -08:00
Philip Rideout
73a2ef7944 Add favicon. 2018-11-13 12:07:57 -08:00
Philip Rideout
7c2c4f3b11 Fix parquet wrap mode. 2018-11-13 12:07:47 -08:00
Philip Rideout
0faf7bbcb6 Publish Hugo site and web tutorials.
This performs the steps described in site/README in order to publish
the Hugo site to GitHub Pages:

    https://google.github.io/filament
2018-11-13 11:24:41 -08:00
Romain Guy
bb3e9a47e5 Update link to CIE colormetric tables
Fixes #452
2018-11-05 15:53:41 -08:00
Philip Rideout
a42dcd2291 JavaScript code re-org (#443)
This removes the old CPP-based web samples in favor of the new JS API.

The `web/samples` folder will be added in a subsequent commit.
2018-11-01 17:05:30 -07:00