This works by aliasing CUSTOM0 - CUSTOM7 to morphing attributes, and by
extending our existing skinning variant.
This PR was tested against some upcoming changes to gltfio.
Issue #1149, #1417
This is a prep step for the upcoming morph feature and does not require
a bump to our material version number.
Stay tuned for a new sample app that demonstrates this feature.
* Make CMake 3.10 the minimum version, add LTO option
* Install a newer CMake on Linux CI builds
* Update LLVM and Cmake on Windows CI
* Update build/windows/ci-common.bat
Co-Authored-By: Ben Doherty <benjdoherty15@gmail.com>
* Update formatting
* Apply suggestions from code review
* Update build/windows/ci-common.bat
* Update CMake
* Switch Android projects back to CMake 3.6
⚠️ breaks materials
There used to be a constraint that ibl cubemap needed to be
256x256. This constraint is now relaxed. IBL cubemaps can be any size.
We also add 16 float4 of padding to the frameUniform, which brings
its size to 1 KiB, the idea is to prevent more breakages in the
future.
This eliminates the flicker caused by triangle noise based dithering
when FXAA is turned on. This will require further investigation to
see if we can use triangle noise with FXAA without such artifacts.
* 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).
* 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
Also use new default bias parameters that seem to work better with
more scenes.
Renamed SAMPLING_HARD to SAMPLING_PCF_HARD because the GPU still
performs 4-taps PCF.
The previous code worked only for directional lights and didn't handle
LISPSM correctly (the bias was scaled down).
We now apply the bias in world space, which works with all configurations.
Additionally the bias was always wrongly scaled by 2x.
The cost is 3 multiply-add.
* 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
* 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.
* 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 just a cleanup and does not change any behavior. The old code
was a little strange because we'd generate code designed for OpenGL but
we'd pass VULKAN to the code generator. This was a little white lie that
really meant: "I will need SPIRV (for optimization purposes only)"
vertex shader interpolants are interpolated at pixel centers by the GPU,
but we were doing our own "pixel-center" adjustment, so we ended-up with
"vertex_uv" at a pixel corner instead of center.
with this change, the vertex shader always compute vertex_uv in
fractional texels and the conversion to texture coordinates is done
in the fxaa code.
The half-pixel adjustment is removed.
This leads to sharper looking images because in addition to shifting
everything by 0.5 pixels, this was essentially applying a box-filter
to the whole picture -- kind of like taking 1 mip level down.
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.