Commit Graph
710 Commits
Author SHA1 Message Date
Philip Rideout 82e61ddc88 Fix the JS IcoSphere tangents.
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
2018-10-29 17:37:42 -07:00
Romain Guy 3a9f3a1984 Update to Kotlin 1.3 (#436) 2018-10-29 17:37:21 -07:00
Philip Rideout 3b793a7994 Fix bad memory access in JS wood demo. 2018-10-26 16:29:26 -07:00
Ben Dohertyandprideout e2777b9100 Update libs/filamentjs/tests/test_parquet.js
Co-Authored-By: prideout <philiprideout@gmail.com>
2018-10-26 10:30:44 -07:00
Ben Dohertyandprideout 96cb5d5951 Update libs/filamentjs/tests/test_parquet.js
Co-Authored-By: prideout <philiprideout@gmail.com>
2018-10-26 10:30:44 -07:00
Ben Dohertyandprideout e6bb8a6235 Update libs/filamentjs/tests/test_parquet.js
Co-Authored-By: prideout <philiprideout@gmail.com>
2018-10-26 10:30:44 -07:00
Ben Dohertyandprideout 934b75e68b Update libs/filamentjs/tests/test_parquet.js
Co-Authored-By: prideout <philiprideout@gmail.com>
2018-10-26 10:30:44 -07:00
Philip Rideout 58f36d1a7f New JS test: draw shaderball with parquet wood texture.
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...
2018-10-26 10:30:44 -07:00
Philip Rideout 83e4402e90 JS: fix use-before-free for PNG data. 2018-10-26 10:05:18 -07:00
Philip Rideout c6a1900beb Add JS utility for PNG files. 2018-10-26 10:05:18 -07:00
Ben Doherty 17021a1167 Retry installing llvm on Kokoro Windows if failure (#400) 2018-10-25 13:31:43 -07:00
Philip Rideout f0fbdaec28 JS users no longer need to call loadMathExtensions() 2018-10-25 08:16:32 -07:00
Philip Rideout b73f58e6ef Expose MeshIO to JavaScript clients. 2018-10-25 08:12:53 -07:00
Mathias Agopian 254e3db215 More per-scene renderable UBO to View... for now
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.
2018-10-24 15:11:54 -07:00
Mathias Agopian d9df864de4 Get rid of RangeSet. 2018-10-24 15:11:54 -07:00
Mathias Agopian 995b8361b8 Don't use RangeSet anymore.
It was used only in one place, always with a single range. For now,
we just always upload the whole froxel record buffer (64K).
2018-10-24 15:11:54 -07:00
Mathias Agopian a61af02038 Pass View& instead of View* around 2018-10-24 15:11:54 -07:00
Mathias Agopian 84bfbac5fa The lights UBO must be per-View
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.
2018-10-24 15:11:54 -07:00
Mathias Agopian 912b301790 Try to bring some sanity to our UBO structures
- 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
2018-10-24 15:11:54 -07:00
Mathias Agopian b707027401 Avoid a light UBO data copy
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.
2018-10-24 15:11:54 -07:00
Philip Rideout 68dfb5ae80 Introduce reference page for JS.
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.
2018-10-24 10:05:08 -07:00
Philip Rideout ab3770d281 Fix JS docgen script for Kokoro. 2018-10-24 09:33:44 -07:00
Philip Rideout 28c56eb354 build.sh: the web archive now includes JS docs
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.
2018-10-24 08:55:14 -07:00
Ben Doherty 30eccc78b6 Add support for iOS simulator (#398)
* Add support for iOS simulator

* Use correct case for include
2018-10-23 10:30:01 -07:00
Philip Rideout ab24665396 Allow JS clients to configure FXAA and WebGL context. 2018-10-23 07:58:16 -07:00
Philip Rideout 9e7b589d0a Fix FXAA pixel alignment.
Fixes #397.
2018-10-19 16:42:01 -07:00
Ben Doherty 979b6f00fd Default to Java 9 on Windows Kokoro (#413) 2018-10-19 15:17:16 -07:00
Ben Doherty 0754edbf9b Fix broken iOS build (#411) 2018-10-19 12:51:53 -07:00
Philip Rideout 9916af3ab1 Simplify docgen script per code review. 2018-10-19 12:40:38 -07:00
Philip Rideout dcfbe694b1 Add fullscreen button to embedded JS demos. 2018-10-19 12:40:38 -07:00
Philip Rideout 835cc93b71 Doc generator now uses argparse. 2018-10-19 12:40:38 -07:00
Mathias Agopian 2f14ac64a7 fix iOS build on case-sensitive filesystems 2018-10-19 11:42:54 -07:00
Mathias Agopian e96f982c9f Fix typo in RangeSet
Fixes #407
2018-10-19 11:42:39 -07:00
Philip Rideout 605a836565 Add JavaScript utility functions to reduce boilerplate. (#406)
* JS utilities: simplified render method.

* redball tutorial now rotates camera.

* JS utilities: add createTextureFromKtx.

* JS utilities: add createIblFromKtx.

* Repair testwasm.

* Update libs/filamentjs/docs/tutorial_redball.md

Co-Authored-By: prideout <philiprideout@gmail.com>

* Update libs/filamentjs/docs/tutorial_redball.md

Co-Authored-By: prideout <philiprideout@gmail.com>

* Update libs/filamentjs/docs/tutorial_redball.md

Co-Authored-By: prideout <philiprideout@gmail.com>
2018-10-18 18:19:05 -07:00
Mathias Agopian 1cde20d822 Avoid a normalize() in the vertex shader
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.
2018-10-18 17:37:06 -07:00
Mathias Agopian a547f11a8c fix more comment typos 2018-10-18 16:49:47 -07:00
Philip Rideout 83de0fc3e8 The redball tutorial now describes matc and cmgen.
This commit also adds a help option to `build.py` and allows
customization of the output folder.
2018-10-18 16:46:15 -07:00
Ben Doherty 3ed2dd08fb Handle device orientation changes (#399) 2018-10-18 14:43:32 -07:00
Ben Doherty db729b157a Remove development team for iOS sample (#401) 2018-10-18 13:53:55 -07:00
Ben Doherty 29119c7248 Add iOS support to Filament (#360) 2018-10-18 12:42:13 -07:00
Philip Rideout 356c3a2c24 Flesh out the JavaScript tutorials. 2018-10-18 12:29:22 -07:00
Philip Rideout b0853b5eb6 jsbindings: fix buffer lifetime bug.
This is a fix-up to f5319f2.
2018-10-18 12:29:22 -07:00
Philip Rideout d324dc724a Start another literate tutorial / demo for JavaScript.
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.
2018-10-18 12:29:22 -07:00
Romain Guy e6435a7431 Update README 2018-10-17 16:30:30 -07:00
Philip Rideout d3e7f40398 Add IBL to jsbinding and testwasm. 2018-10-17 16:13:53 -07:00
Philip Rideout f5319f2492 jsbindings: fix buffer lifetime bug.
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.
2018-10-17 16:13:53 -07:00
Philip Rideout e00ba80561 jsbindings: add JS utilities, enhance testwasm. sceneform-1.6pr5 2018-10-17 10:17:04 -07:00
Philip Rideout d15e275de0 Add glMatrix to third_party.
Some of our web tests and demos will make use of this library, and it's
useful to leverage a local copy instead of a CDN during development.
2018-10-17 09:57:08 -07:00
Romain Guy 920cc7a84a Normalize normals and tangents in the vertex shader (#388)
This avoids breaking bitangents when a scale value is set in the
transform matrix
2018-10-16 17:12:54 -07:00
Mathias Agopian 3b504f2941 add Stream::getTimestamp() to java api 2018-10-16 16:52:26 -07:00