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).
If spherical harmonics are not specified in IndirectLight (i.e.
omitted entirely), we instead use the roughness==1 LOD in the shader.
This produce much better results with absolute HDR environment, and
generally works better more often.
This is now the preferred solution.
For cases where spherical harmonicas are better or preferred, they
can simply be supplied as before.
- we add an 'intensity' parameter that allows to control the strength
of the AO effect. This is useful for aesthetic reasons.
- the default intensity is now 2x that of before this change, which
makes the intensity parameter match AO papers this implementation
is inspired of.
- bias is now z-dependent, which reduces some self shadowing wrt the
depth.
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).
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.
- "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
This is our first ImGui extension, it draws a draggable 3D arrow for
manipulating a unit vector. This is especially useful for tweaking the
light direction.
It's now possible to enable/disable tone-mapping, fxaa, msaa and
dynamic resolution independently.
A new set/getToneMapping() method is added to View.
It's still possible to disable *all* these post-processing effects
together using setPostProcessing(). This is currently needed when
rendering a transparent view (such as UI) on top of another view.
This limitation might be addressed in the future.
This fixes#621
This is effectively moving all shader computations to view space,
improving floating-point precision in the shaders, by staying
around zero where fp precision is highest. This also ensures that
when the camera is very far from the origin, objects are still
rendered and lit properly.
* Add specular anti-aliasing properties to materials
curvatureToRoughness
limitOverInterpolation
These techiques were supposed to be enabled by default on
desktop but it turns out they were broken. They must now
be enabled manually on each material instead (and work on
mobile).
* Update docs/Materials.md.html
This adds a new demo that leverages ImGui. It looks very similar to the
existing material_sandbox demo we have for desktop, with a few
differences:
1. Does not use FilamentApp.
2. Does not draw a shadow plane.
3. Does not use a TrueType font in ImGui. (improves load time)
4. Does not allow the user to spin the model. (will fix soon)
We now have a triumvirate of web demos with a progression in complexity:
1. triangle
2. suzanne
3. sandbox
This is a sufficient set of WebGL samples for now, at least until we
finish creating a proper JavaScript API.
This CL factors out some of the common code with the native sandbox
demo, but keeps the UI definition separate since the web demo has some
minor differences (e.g., there is no shadow plane yet).
Note that using viewport units for height was wrong; it caused a bad
aspect ratio on Android while the URL bar was visible. This is explained
in an article:
https://developers.google.com/web/updates/2016/12/url-bar-resizing
These two functions expect a vector of the same size as the
matrix's storage vectors (float4 for a mat4f for instance) which
has two major issues:
- The vector must end with 1 for homogeneous coordinates to work
- Passing a single scalar (mat4f::scale(0.5)) creates a matrix
whose diagonal is set to that scalar, thus breaking homogeneous
coordinates
With this change scale and translate expect a vector who dimensionality
is 1 less that of the matrix's underlying storage vectors. i.e. a float3
for mat4f.