Commit Graph

201 Commits

Author SHA1 Message Date
prideout
3a7d80f29b Restore "Add single-threaded config to Filament. (#130)"
This reverts commit 24022010f9.
2018-08-27 08:51:46 -07:00
Romain Guy
33c44ee9ce Install BlueGL (#148)
* Add READMEs to install packages

* Don't install BlueVK headers, install BlueGL lib
2018-08-27 08:50:35 -07:00
Philip Rideout
24022010f9 Revert "Add single-threaded config to Filament. (#130)" (#152)
This reverts commit e3457aa0a7.
2018-08-26 18:40:49 -07:00
Romain Guy
ca73e73745 Don’t check for nullptr before free() (#151) 2018-08-26 16:24:19 -07:00
Tim van Scherpenzeel
966d1e5de2 fixed three small spelling mistakes (#149) 2018-08-26 10:01:41 -07:00
Ben Doherty
95fb7ae0ab Tungsten: prep for material parameters editing (#141) 2018-08-25 10:25:51 -07:00
Romain Guy
abf4cfba44 Add downloads section 2018-08-24 19:07:17 -07:00
Romain Guy
8cfdf187c5 Add link to build artifacts 2018-08-24 18:48:14 -07:00
Romain Guy
bad06aef9f Cleanup build script 2018-08-24 17:22:13 -07:00
Ben Doherty
2874897dc1 Tungsten: use single-line functions where possible (#144) 2018-08-24 17:18:21 -07:00
Philip Rideout
1dbe386268 Add WebAssembly to the build. (#145)
This does not add any samples or continuous integration, but it at least
allows developers to do a "-p webgl" and check if an actual wasm file
for the core Filament library can be succesfully built.
2018-08-24 17:18:12 -07:00
Philip Rideout
446959042f Make code friendly to WebAssembly. (#140)
This does not add any build stuff or new sample code yet, it just does
some prep to our C++ codebase:

- Similar to Android, WebAssembly will not be using BlueGL. We were
  using a mixture of #if and #ifdef when checking for the existence of
  certain GL prototypes, but the latter is what we want in order to
  build robustly with any GL headers. (We still perform run-time checks
  for extensions, this doesn't change that.)

- Add a trivial ContextManager, does a bit more than Dummy since it
  needs to create an actual driver. This doesn't get compiled yet, it
  just adds files to the tree.

- WebAssembly does not support mmap, execinfo, or asm volatile.
2018-08-24 17:17:40 -07:00
Mathias Agopian
a0d1084b40 assert() when setting bones but skinning is not enabled 2018-08-24 17:07:12 -07:00
Romain Guy
0dd89ef309 Update instructions for Java based systems (#143) 2018-08-24 16:44:20 -07:00
Philip Rideout
e3457aa0a7 Add single-threaded config to Filament. (#130)
* Add single-threaded config to Filament.

This adds a tick method to Engine and disables a couple components
in Renderer (FrameSkipper and FrameInfoManager).

This will make it easier to support WebGL, and will allow us to remove
some of the command buffer debugging stuff that we added for Vulkan.

* tick => execute, and other review feedback

* Restore the ASSERT for FFence::wait.
2018-08-24 16:37:12 -07:00
Romain Guy
b467bb0339 Update README v0.1.0-alpha2 2018-08-24 12:37:11 -07:00
Ben Doherty
4954364d45 Rename Windows CI artifact to filament-windows.tgz (#138) 2018-08-24 10:44:36 -07:00
Ben Doherty
255b6a903c Fix Windows build (#137) 2018-08-24 10:35:21 -07:00
Romain Guy
f9fbb6aef1 Add Windows badge 2018-08-24 10:26:35 -07:00
Romain Guy
ac70617f12 Update spirv-tools (#136)
This completely gets rid of unnecessary highp qualifiers in optimized GLSL code.
2018-08-24 10:24:48 -07:00
Ben Doherty
32993ffda9 Kokoro support for Windows (#135) 2018-08-24 10:13:16 -07:00
Romain Guy
4585b8f896 Add clearCoatNormal property (#131)
* Add clear coat normal map support

This change allows to set a separate normal map for the clear coat layer of a material.

* Document the new clearCoatNormal property

* Fix typo
2018-08-24 08:56:44 -07:00
Mathias Agopian
7a14aadb28 sample clean-up and new sphere object (#134)
* 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.
2018-08-23 21:12:46 -07:00
Romain Guy
8f1d9bcd26 Remove Windows build status for now 2018-08-23 18:20:04 -07:00
Romain Guy
8dbc6b41e7 Add build status to README (#132) 2018-08-23 18:17:14 -07:00
Ben Doherty
6b435a0e8e Tungsten: rework model to be immutable (#127) 2018-08-23 16:35:07 -07:00
Romain Guy
711d8877bf Add comment explaining an odd choice 2018-08-23 14:19:21 -07:00
Philip Rideout
099738e545 Try to clean up asset folders for sample apps. (#128)
* Try to clean up asset folders for sample apps.

This removes the build step where we copy a subset of assets, and makes
it so that FilamentApp hands out a "root path" for assets. For now this
is determined based on the location of the executable. This allows
developers to launch samples from any CWD.

Closes #11

* Restore asset copy to build.
2018-08-23 12:46:45 -07:00
Philip Rideout
7fff7d715f Update VkMemAlloc and fix its usage. (#126)
This implements the following suggestions from Adam Sawicki:

(1) Update VkMemAlloc to dev branch.
(2) Use VMA_MEMORY_USAGE_CPU_ONLY in the stage pool.
(2) Add vmaFlush after every vmaUnmap.

We also considered removing Map / Unmap in favor of persistent mapping
via VMA_ALLOCATION_CREATE_MAPPED_BIT, but decided to be conservative
until we have a chance to rethink our UBO update strategy.

Closes #19
2018-08-23 10:20:12 -07:00
Philip Rideout
aa518369b4 Move deprecated Image out of libs. (#125)
This moves the old Image class into cmgen because it is the only client
that still uses it. We can migrate cmgen to LinearImage in the future.
2018-08-23 10:19:02 -07:00
Mathias Agopian
c0a3fc51a4 improve vectorization by massaging the code a bit 2018-08-23 10:16:29 -07:00
Mathias Agopian
fc98c775c5 more work towards working light-trees
- improve API of computeLightTree() which should 
  now be functional.

- pre-calculate the range of each light in
  screen-space, so we don’t have to do so
  over and over again in computeLightTree().

- define the GPU-side “node” for the light-tree,
  this is a place-holder until we really implement it.
2018-08-23 10:16:29 -07:00
Romain Guy
f8c87f8f81 Update screenshots 2018-08-22 16:29:32 -07:00
Romain Guy
d237406ccd Clean up multiscatter and single scatter specular combination 2018-08-22 15:58:04 -07:00
Mathias Agopian
9a129dca1e improve BinaryTreeArray unit test
make sure we visit children before the parents.
2018-08-22 14:55:17 -07:00
Mathias Agopian
1f3dad48b6 Improve Binary Tree Array by getting rid of the recursion
We use a stack instead, it’s not terribly different
from the recursion but it saves function calls
which use a lot more stack than needed.
2018-08-22 14:55:17 -07:00
Mathias Agopian
38de58007c checkpoint: ground work for calculating binary light trees
computeLightTree() takes a list of light as
a bitfield and produces a depth-first 
binary tree array that can be used to efficiently
check which lights volumes contain a given z
coordinate in screen space.

Currently computeLightTree() produces the array
locally on the stack, which isn’t useful, but
before we can make use of it, a lot of other
things have to happen.
2018-08-22 14:55:17 -07:00
Mathias Agopian
4fed143099 pass CameraInfo to froxelizer 2018-08-22 14:55:17 -07:00
Mathias Agopian
8249a8a6d7 Always sort lights by distance to the camera-plane
This will be useful later.
2018-08-22 14:55:17 -07:00
Adrian Perez
d9c07220c8 FrameUniforms.resolution gets consistent precision between VS/FS (#122)
* Add option USE_EXTERNAL_GLES3

Causes gl_headers to use GLES, even on desktop.
Causes all ContextManagers to be elided;
users are expected to provide their own.

* FrameUniforms.resolution gets consistent precision between VS/FS
2018-08-22 14:53:47 -07:00
Philip Rideout
e45e7b256d Introduce mipgen frontend. (#120)
* Introduce mipgen frontend.

For now this is fairly simple although it does let you choose a filter.
Another cool feature is that an HTML file is generated which makes it
easy to review the generated miplevels.

This does not expose the Boundary enum to users because it has not yet
been implemented in the core Image library.

* Fix up mipgen per code review.
2018-08-21 17:54:27 -07:00
Romain Guy
b587ec3f43 Fix revision formatting 2018-08-21 15:55:48 -07:00
Romain Guy
b86928179b Document energy compensation for multiscattering BRDFs (#121)
* Document better BRDFs

- Document the loss of energy in the specular BRDF
- Start documenting the gain of energy in the diffuse BRDF

* Explain energy compensation with second scaled lobe

* Add multiscattering pre-integration
2018-08-21 15:51:54 -07:00
Mathias Agopian
c8c61fdb8a more froxel optimizations (#118)
* better froxel records compression

We used to compress froxel records by reusing the
previous record on the left if it was identical,
now we additionally check the record above if
that fails.

In practice this saves 10% to 30% space in the
froxel record buffer, which is a scarce resource 
for us.

e.g. if a light occupied 3x3 froxels in a given 
z-slice, without compression 9 records would be
used, with left-only compression, only 3, 
and with left+above compression, only 1.

* use size_t for in and out parameters

this helps the compiler in many places, not
having to cast from 64 to 32 bits.

* implement bitset’s any() and all() operations with NEON

* empty froxels are a common case, handle it first
2018-08-20 16:45:16 -07:00
Philip Rideout
d12021a196 Fix args to update-alternatives. (#117) 2018-08-20 15:37:52 -07:00
Romain Guy
d91129d42c Merge branch 'master' of https://github.com/google/filament 2018-08-20 14:53:38 -07:00
Romain Guy
424fd3a6e6 Add more f0 sample values 2018-08-20 14:53:35 -07:00
Romain Guy
e329ec1872 Fix typo 2018-08-20 12:27:49 -07:00
Adrian Perez
c1ebe11f3a Add option USE_EXTERNAL_GLES3 (#116)
Causes gl_headers to use GLES, even on desktop.
Causes all ContextManagers to be elided;
users are expected to provide their own.
2018-08-20 12:26:53 -07:00
Romain Guy
0b914d2ad3 Filament is a real-time renderer 2018-08-20 11:48:22 -07:00