Commit Graph

18 Commits

Author SHA1 Message Date
Romain Guy
4567b01c1d Multi-thread shaders generation when compiling materials (#3464)
* Stop using members as globals between methods

* Multi-thread shaders generation with JobSystem

* Pass JobSystem to MaterialBuilder::build()

* Fix MeshAssimp to use the new API

* Allow the Java API to pass a job system via Engine

* Update docs

* Apply suggestions from code review

Co-authored-by: Philip Rideout <philiprideout@gmail.com>
2021-01-29 09:30:37 -08: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
Philip Rideout
d8ac60009c FilamentApp: use angle bracket syntax for includes. 2020-04-03 16:28:38 -07:00
Philip Rideout
37e2f46e10 Move FilamentApp into libs/filamentapp.
This will make it easier to migrate gltf_viewer into tools.

This is not a rewrite of FilamentApp, just a baby step.
2020-04-03 16:28:38 -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
Philip Rideout
898ed70aa0 Remove <iostream> from math headers.
This speeds up our build time by using <iosfwd> and un-inlining the
vector print functions.
2020-01-06 15:09:06 -08:00
Romain Guy
78842b59c9 Only build FBX and OBJ importers (#2003) 2020-01-06 14:38:32 -08:00
Romain Guy
e896ed9d87 Add support for Parallax Occlusion Mapping in the PBR demo 2019-05-24 17:45:26 -07:00
Romain Guy
975395ce98 Simplify duplicate code 2019-05-24 17:01:57 -07:00
Romain Guy
f0aab6e46a Add micro-shadowing feature (#1188)
* Add micro-shadowing based on ambient occlusion

* Prevent crash when IBL is turned off

* Apply micro-shadows to baked AO only

* Remove debug code

* Add opacity control

* Fix opacity term

* Switch to micro-shadowing from Chan 2018
2019-05-16 12:24:16 -07:00
Mathias Agopian
b26684deed rename namespace filament::driver -> filament::backend 2019-03-26 11:47:47 -07:00
Ben Doherty
5c57a18b35 Initialize MaterialBuilder in samples (#850) 2019-02-20 14:47:29 -08:00
Caleb Leak
d2f8fa5a36 Fixed printing of wrong file names
In multiple samples when a file didn't exist, it printed the first file as being the offending argument, regardless of which actually was.
2019-02-11 09:04:21 +01:00
prideout
5ee359cf40 Move math namespace to fix #746. 2019-02-07 09:23:07 -08:00
Ben Doherty
b759074c8f Deprecate set method on MaterialBuilder (#545)
* Remove the defines entry in material definitions

* Deprecate set function

* Remove some getter methods from MaterilaBuilder

* Fix tests, add to CI
2018-11-28 15:35:19 -08:00
magicwhale
fc0d587b40 Added support for more features in gltf_viewer sample 2018-11-19 09:27:08 -08:00
Romain Guy
c429af310e Cleanup sample code 2018-08-13 17:01:04 -07:00
Romain Guy
b3d758f3b3 Initial commit 2018-08-03 10:38:22 -07:00