* 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
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).
(1) Merge two same-sized lists into a single map with struct values.
(2) Constify all the string-to-enum maps and move them into the
scope where they are used.
(3) Move a bunch of object methods into static free functions to
simplify the header and reduce code duplication.
(4) The PARAM_KEY_FOO string constants were referenced only once (except
in a few error messages) so replace them with string literals.
* 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
* 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
This is mostly about moving constant from EngineEnums.h to
the backend, either in Program.h or DriverEnums.h
The goal is that libbackend doesn't depend on EngineEnums.h
In this first step, we just "blindly" move everything under src/driver
to a new library libbackend.a. And all headers are moved under
private/backend.
Note that "driver" is renamed "backend", but namespaces are unchanged for now.
Later we'll have to untangle the actual private headers from public
ones and ideally not have any private headers.
Program::shader() was taking a string before which didn't make sense
for spirv. Now it's just a blob, in the case of GL/Metal, the blob
must be a null terminated c-string, and the size must include the
terminating null character.
This fixes an out-of-bound access in ShaderBuilder::getShader() (which
doesn't exist anymore), because it was creating a CString passing
a size that included the null terminating char, which is not was CString
expects. CString can now assert() in that case.
driver::Program now uses a std::vector<> for storage, which we should
fix at some point (b/c it's a public header). CString was not suited to
store binary blobs.
- 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.
filaflat only had on header dependency on filabridge (DriverEnums.h)
and only needed two small enum types.
In fact, I don't think it was right for filaflat to assume any
particular value for these fields -- this is the responsibility of the
callers.
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.
Material archives already contain two version chunks (post process and
normal) but the renderer was ignoring these. The change makes it so that
matc writes a new MaterialEnums value into these chunks, and the engine
panics when receiving a material version that it does not expect.
This also adds a --version option to matc. No changes were necessary
to matinfo because it already prints out these values.
Fixes#796.