11 Commits

Author SHA1 Message Date
Mathias Agopian
a878d1f39c improve sample_full_pbr
- -m option now works with "directory_*.png" or just "*.png"
- "color" replaced by "albedo" to mach other places in the source tree
- fixed warnings
- clear the background when IBL is not used
2023-02-01 10:04:02 -08:00
Romain Guy
8e00df1de5 Add Color::absorptionAtDistance() to compute absorption for refraction. (#1964)
Specifying the transmittance color at a specific distance is more
user-friendly than specifying absorption coefficients directly.
2019-12-10 18:20:23 -08:00
Mathias Agopian
b78ea90c27 apply thin roughness remapping to solid as well
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)).
2019-12-08 22:18:18 -08:00
Mathias Agopian
1a9d0926ee Added a torus and simple cube shapes
renamed "cube.obj" to "rounded_cube.obj", which it was (rounded)
2019-12-03 17:49:40 -08:00
Pixelflinger
9187b31279 fix debug environment labels
- front and back labels where inverted:
  +z is the front of the cube and -z is its back
  when looking at the cube from the outside
  with a camera pointing towards -z (and the cube
  in front of it). This is the GL definition.

- make the synthetic uvXXX debug environment 
  colors match those of the debug environment
  (except for -Z/back which is magenta instead
  of black).

- add some documentation about skybox and cube map.
2018-09-21 11:50:29 -07:00
Pixelflinger
09830cd126 Improvements to CMGEN handling of cubemaps
- cmgen now creates reflections maps for all input
assets by default instead of just for equirectangular 
images.

- equirectangular decode doesn't mirror -- that's
done by the mirroring code now.

- mirroring can be turned of with --no-mirror

- option --mirror is gone

- faster mirroring code (do it before generating
  mipmaps)

- added labels to faces of debug.png environment

- added a debug equirectangular image in third_party
(creative commons license)
2018-09-21 11:50:29 -07:00
Mathias Agopian
d1df978638 save this png as 3 channels, so we can prefilter it. 2018-09-18 01:40:38 -07:00
Romain Guy
4002498438 Add new HDR environment maps in third_party (#182)
These are much better than the ones we had in assets/
2018-08-29 14:22:58 -07:00
Philip Rideout
db2e1426e9 Introduce two WebGL samples: triangle and suzanne. (#170)
* Introduce two WebGL samples: triangle and suzanne.

This commit has no effect on mobile / desktop builds, it only adds new
targets to the `-p webgl` build.

We will eventually expose a proper JavaScript API, but for now these
samples use a (somewhat under-engineered) `filaweb` framework whereby
the WebAssembly module exposes a small number of C entry points: launch,
render, and resize.

Each sample has two source files: a cpp file and an html file. The cpp
file generates js / wasm pair.  The generated js is simply a loader for
the wasm.

The CMake script creates a pristine "public" folder which contains the
minimal set of files needed to serve the web application using a simple
static file server. The public folder like this:

    /suzanne.js         built by em++ from suzanne.cpp
    /suzanne.wasm       built by em++ from suzanne.cpp
    /suzanne.html       copied from REPO/samples/web
    /filaweb.js         copied from REPO/samples/web
    /favicon.png        copied from REPO/samples/web
    /monkey/*.png       copied from REPO/assets/models
    /monkey/*.filamesh  built by filamesh
    /desert/*           built by cmgen

To decode PNG textures, we use the somewhat unusual approach of using
JavaScript to draw them into a hidden 2D canvas, then reading back the
pixels. This allows us to avoid fattening up the wasm file with a PNG
decoder. An alternative idea would be to pass a DOM Image directly into
glTexImage2D, but this would require some #ifdefing and/or JS injection
in Filament's OpenGL backend.

* Optimize the suzanne material.
2018-08-28 11:09:06 -07:00
Romain Guy
42e319e074 Add white furnace IBL (#89)
Useful to test BRDFs and energy conservation
2018-08-13 15:51:44 -07:00
Romain Guy
b3d758f3b3 Initial commit 2018-08-03 10:38:22 -07:00