This cleans up 3 related issues, but only the first of these caused an
actual user-visible bug:
(1) When the IBL was null, prepareLighting was failing to bind the black
1x1 texture.
(2) If you added and removed an IBL from a Scene, then Scene was not
returned to its initial state.
(3) The default 1x1 IBL used an intensity of 1 rather than 30000, which
is inconsistent with the null IBL.
Fixes#1940.
We now take into account the light bouncing between the two interfaces
of the materials. We can do this because we assume thin surfaces,
meaning that the light will exit where it entered and with the same
direction that the specular.
This strengthen the specular at grazing angles (and reduces the transmission).
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.
this is because for solids we're also handling both interfaces in one
go (as opposed to calculate the actual btdf), and roughness should
depend on the ior.
Also rename some variables for less confusion (we now use
incident(I)/refracted(R)).
We also now assume a thickness of 0, if it's not set in the material.
We don't want to assume any particular thickness, because it depends
on the scene's scale.
Also clamp the remapped roughness.
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.
Filament will now allow incomplete mipmap chains for the IBL and
map the roughness to the available chain.
This allows to create roughness cubemaps with a minim size for
roughness==1, instead of always mapping it to 1x1.
cmgen will now use 16x16 cubemaps for roughness==1, which
improves the quality of rough objects significantly.
The beauty of this is that there is no asset or API change. Old assets
will continue to work like before.
This cleans up 3 related issues, but only the first of these caused an
actual user-visible bug:
(1) When the IBL was null, prepareLighting was failing to bind the black
1x1 texture.
(2) If you added and removed an IBL from a Scene, then Scene was not
returned to its initial state.
(3) The default 1x1 IBL used an intensity of 1 rather than 30000, which
is inconsistent with the null IBL.
Fixes#1940.
This removes a lot of code and will make it easier to migrate into a new
library with Java bindings, etc.
- The clipping planes and projection matrix were unused, removed them.
- In split view mode, our demos were using only 2 of the 3 manipulators,
removed one.
- Instead of callbacks and update methods, users can simply ask for the
current matrix at every frame.
- The manipulator's job is to consume mouse events and maintain an
"look at" basis, there is no need to store a reference to a Filament
Camera.
some drivers declare supporting anisotropic filtering, but don't
support calling glSamplerParameter() to set the max anisotropy, presumably because they only support glTexParameter().
We simply turn off anisotropic filtering on these drivers.
Sometimes CMake decides to use the JNI bits included with XCode instead
of those from the installed JDK. The header files are located in different
directories. This does the proper include.
This new sample differs from "Hello Camera" in that it exercises all
three ways of using Stream. It also uses Canvas instead of Camera2 to
draw into the external texture. It shows two sets of stripes, one
animated using the shader and the other animated using Canvas. If the
two stripes are aligned, then the stream is perfectly synchronized.
Users can tap the screen to cycle between the three modes.