This is still somewhat work-in-progress, but good enough to be useful.
Some caveats:
- large blurs don't work well with cascades
- the implementation uses more memory than it could
- contact shadows are now supported for point and spot lights
- and are now independent from regular shadows, that is they can
be enabled without enabling regular shadows
The only limitation currently is that the distance and step count for
ALL contact shadow are taken from the directional light options.
* Add support for screen-space contact shadows
This CL adds support and always enables it.
toggles and setting in the next CL (same PR).
* Plumb settings for screen-space contact shadows
screen-space contact shadows is handled like a shadow option,
parameters (including on/off) are set in the LightManager, using
the existing ShadowOptions API.
Additionally there is a per-renderable toggle.
Both toggles are off by default.
* Allow contact shadows when shadowing is auto-disabled
Shadowing can be auto-disabled when for instance there are no
shadow casters in the scene. We still allow contact shadows in
that case.
This would allow for instance, to make the vegetation on a terrain
not shadow-casting, and still get some shadowing there by using
contact shadows instead.
* apply micro-shadowing after contact shadows
also, don't compute contact shadows when we know we're fully shadowed.
Replace with forward declarations if needed and includes in .cpp that
now need them.
The idea here is to have our headers have the least amount of impact as
possible on our clients (e.g. compilation time).
- "stable" mode disables all resolution optimizations that can affect
stability of the shadow map (e.g. lispsm, focusing)
- expose near/far hint + stable option to java
* Add missing method to query the type of a light
* IcoSphere now generates front facing triangles
* Add a fairly generic sphere object to use in samples
it provides an ico sphere with normal, and reuses
the same vertex/index buffer for each new instance.
Each instance can have its own material, size and
position.
currently it’s not possible to change the # of
subdivisions.
* FilamentApp now provides a “default” pbr material
this makes it easier to create renderables for
testing.
* clean-up lightbulb and add spheres for each light
lightbulb now has less hardcoded things and it
spawns a small sphere for each light.