We were not normalizing one of the orthonormal basis vectors, causing
the visual aberration reported in #423.
This CL also add a "back light" to the redball demo to lighten up the
dark area in the IBL.
Fixes#423
Shameless recreation of the Android `textured-android` sample. I will
make this into a tutorial soon.
Also made some improvements to the test-builder Python script. Really,
this script exists only to make iteration easier; we need a better
solution for automated tests...
If a scene was used in several views, we would update the renderable
ubo several times per frame, which is not desirable. So we now have
such a UBO per-view. This could change in the future, depending
how we want to manage it.
We used to have a UBO for lights per scene, however it's better to
have one per view, since it depends on the camera heavily and is
limited in size.
Not doing so, could force us to upload the same UBO multiple times
per frame, for e.g. if the same scene was used in multiple views.
- move UBO declarations in UibGenerator, i.e. next
to their Uniform Interface Block definition.
This should help forgetting to update one but
not the other.
- move UniformInterfaceBlock.h and SamplerInferfaceBlock.h under
private/filament/.
- do the same things for samplers
We use the command stream to store the lights
ubo data (16K max), which avoid a copy and simplifies
the implementation. we can get rid of GpuLightBuffer.
The docgen script now looks for /// comments in the binding definitions,
and generates markdown from those. The reference page has three
sections: classes, free functions, and enums.
Before this CL, the web archive had two folders: "public" (which
contained web demos written in C++) and "filamentjs" (for the barebones
WASM).
After this CL, the web archive will instead have "dist" and "docs". The
dist folder will have the WASM and accompanying JS file, while the docs
folder has the tutorials and their accompanying demos.
If your machine has Python 3 installed, then "build -ap webgl" will
attempt to generate the JavaScript docs. If Python 3 isn't available,
this build step will be skipped. Note that our Kokoro macOS machines
already have Python 3 pre-installed.
Also removed the pipenv file to simplify the Kokoro Python environment.
Fixes#394.
This is achieved by pre-scaling the normals
transform so that the resulting normal doesn't have
any large component allowing to do the normalize()
in the fragment shader in mediump.
This must be done for skinning too.
Unlike the triangle tutorial, this is more focused on materials and 3D
rendering. While much of the verbiage is still TBD, the code snippets
already produce a functional demo after being glued together by the
tangler script.
In order to match its JavaScript counterpart, the Buffer wrapper needs
to use reference counting, and the easiest way to achieve that is
with shared_ptr.