Commit Graph

12 Commits

Author SHA1 Message Date
Ben Doherty
7a1c079050 Use an int, not byte, for variantFilter (#2691) 2020-06-15 11:38:43 -07:00
Philip Rideout
28912b6f57 filamat-android: fix string leaks 2020-06-02 10:16:41 -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
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
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
2e22a26ca5 Fix filamat build (#1005)
Filamat public headers were including a private header. This PR fixes
this problem. It also forces filamat to always be compiled to avoid
breaking filamat without noticing. The flag `-l` is not available
anymore in build.sh as a result.
2019-03-18 18:40:48 -07:00
Mathias Agopian
3297c9bc78 More headers clean-up
- EngineEnums.h is not a private headers as it contained mostly private
stuff

- MaterialEnums.h is still public, but now only contains public stuff.
Private parts were moved to MaterialEnums.h or MaterialBuilder.h

- And finally SamplerBinderMap is moved under private/ as well, since
it's certainly not a public API.

With this change, the public headers of filabridge become more reasonable
and limited.
2019-03-02 00:21:09 -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
Ben Doherty
3faef1f9cb Complete the MaterialBuilder JNI (#845) 2019-02-21 14:53:32 -08:00
Ben Doherty
52ebfb1665 Add Init and Shutdown methods to MaterialBuilder (#840) 2019-02-20 10:44:12 -08:00
Ben Doherty
b3cd6a7f59 Add initial MaterialBuilder JNI (#707)
* Add initial MaterialBuilder JNI

* Move into android/filamat-android
2019-01-15 16:07:42 -08:00