This should help Filament properly support more glTF assets with
transparency, and should make Filament behave more like other
renderers such as three.js.
This lets you see highly readable GLSL when transpiling the generated
SPIRV back to GLSL, with the original variable names preserved.
For now this is only useful when using `matinfo`, but it will soon be
useful in `matdbg` too.
* Add support for KHR_materials_volume
* Add ubershader support for KHR_materials_volume
* Update readmes
* User highp on anything that affects UVs
* Add missing precision qualifiers
* Fix transmission
* gltfio: fix precision in KHR_texture_transform
Fixes#4253.
* Update to the new order of parameters
Co-authored-by: Romain Guy <romainguy@curious-creature.com>
* 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>
* 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
This fixes the depth fighting in the column of red spheres in the test
model while in filamat mode. Thanks Romain for catching this.
It also makes filamat mode more consistent with ubershader mode.
This chooses type=THIN, mode=SCREENSPACE, and blending=TRANSPARENT.
Due to sampler overload, we print a friendly error message and enable a
fallback if the user tries to simultaneously enable ubershader mode, the
clearcoat extension, and the transmission extension.
To see proof that this works, use gltf_viewer with -u and examine the
node hierarchy. You will now see the correct material names instead of
the ubershader names.
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.
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
The bistro model has some UV-free primitives associated with textured
materials. This caused Filament to emit warnings like:
[entity=445, primitive @ 0] missing required attributes (0xb), declared=0x3
We now catch these in gltfio, which enables a friendlier warning so that
the artist can go make a fix:
Missing UV0 data in Bistro_Research_Exterior_Paris_Building_01_paris_building_01_bottom_4669
* 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.
This is our new mobile-friendly and web-friendly library for loading
glTF assets. It is still a work in progress, but already capable of
loading many conformance models, including those with animation,
skinning, and a couple of extensions (nonlit and texture transforms).
Next week we will add a sample app demonstrating its usage.