* 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
.blurScale was in fact a scale factor applied to the circle of
confusion (which makes it indeed a "blur scale", but let's use
a more precise language here).
Update comments to show how to use .cocScale to control the DoF
effect independently from the camera aperture, which can be useful for
artistic reasons.
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.
* Add new color grading feature: shadows/mid-tones/highlights
This feature can be used to color correct specific tonal ranges.
The tonal zones can be precisely controlled.
* Add the ability to set a ColorGrading LUT per View
In this change, material_sandbox allows to change the tone mapping
operator at runtime.
* Add Mathematica notebook used to explore white balance
The implementation is meant to reproduce the temperature/tint sliders
founds in Adobe Lightroom. The temperature can be offset from 2,000K
to 50,000K using a slider between -100 and +100 (-1.0 to 1.0 in our
API). The range of tint was modelled after the range used for the
temperature.
* Fix various issues
- A refactoring wrongly remamed the color grading pass
- Setting a View's ColorGrading to null selects the
default color grading options
* Implement white balance in ColorGrading
This updates the tutorial markdown, fixes up the literate programming
Python script, and updates the web site itself.
The doc build script now uses a Pipfile instead of "requirements.txt",
which I find less frustrating since it does not interfere with other
Python projects on your machine.
Fixes#2483.
This fixes dynamic lighting and SSAO when a viewport is not in 0,0.
In practice this currently happens only when all post-processing is
disabled.
Instead of using gl_FragCoord we introduce a new API,
getNormalizedViewportCoord(), which as the name implies returns
normalized [0, 1] viewport coordinates with origin at the bottom-left,
on all platforms.
This is implemented in this PR by interpolating gl_Position.
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
* 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
We were conflating two concepts in our comments about the roughness
remapping, which was confusing. Also changed the remapping so it
matches a log2 mapping in our default configuration.
When dealing with thin objects we really have two thicknesses to
consider, the thickness in the direction of the normal, which
corresponds to the value used for solid objects, and the thickness of
the object's walls, which generally is a constant.
Reusing thickness in the later case is problematic for assets that have
a thickness map, but are rendered hollow.
In the future we can even imagine handling double-sided hollow objects
by using the thickness information -- e.g. a hollow cube.
Normally the IOR is deduced from the reflectance, but now we allow to
specify the IOR instead or in addition to the reflectance.
In the later case, it's possible to create physically impossible
materials, but this can be useful for artistic reasons.