Commit Graph

1431 Commits

Author SHA1 Message Date
Mathias Agopian
e4c6dcf3bc more efficient depth mipmaping
We simply pick one of the 4 depth texel based on its screen
space offset. Literature showed it doesn't impact AO
significantly.
2019-06-10 15:45:32 -07:00
Romain Guy
0f23633809 Fix warning in OpenGLDriver in release builds 2019-06-10 14:37:19 -07:00
Jeff McGlynn
53adfedc83 Fix msan use-of-uninitialized-value in destroyVertexBuffer (#1277)
GLVertexBuffer.gl.buffers is a std::array which is not
default-initialized, and createVertexBuffer only initializes the first
bufferCount fields of the array.

When destructing, destroyVertexBuffer iterated over all buffers to unset
bindings, but it was erroneously iterating over the entire array instead
of the initialized values.  Update the loop to only iterate over known
initialized values.
2019-06-10 13:38:00 -07:00
Romain Guy
2f736bee19 Update README.md 2019-06-09 21:43:59 -07:00
Ben Doherty
ae37ace15b Refactor MaterialBuilder, remove code duplication (#1269) 2019-06-09 18:58:35 -07:00
Romain Guy
1aed2379b9 Use a 32 bit index buffer when necessary (#1273)
Fixes #1272
2019-06-08 17:44:49 -07:00
Philip Rideout
f93046308c gltf_baker: improve error handling throughout. 2019-06-05 15:25:47 -07:00
Philip Rideout
1d514e6bf6 gltf_baker: allow re-baking after tweaking options. 2019-06-05 15:25:47 -07:00
Ben Doherty
62e51649fa Refactor MaterialBuilder chunks, findProperties (#1254) 2019-06-05 15:08:00 -07:00
Mathias Agopian
edb1beac3d give internet permission to ibl sample
this allows us to use snapdragon profiler
2019-06-05 14:34:58 -07:00
Romain Guy
f441e4ec4e Switch desktop to interleaved RGB noise (#1263)
This eliminates the flicker caused by triangle noise based dithering
when FXAA is turned on. This will require further investigation to
see if we can use triangle noise with FXAA without such artifacts.
2019-06-05 10:45:04 -07:00
Philip Rideout
70d569029b gltf_baker: allow adjustment to seed iterations. 2019-06-05 10:11:23 -07:00
Ben Doherty
018d6461f5 Update README with CoreVideo flag (#1266) 2019-06-04 21:15:42 -07:00
Romain Guy
413ce37681 Code formatting cleanup (#1264) 2019-06-04 21:11:00 -07:00
Romain Guy
9d31b7c008 Formatting of shaders 2019-06-04 16:23:20 -07:00
Philip Rideout
fb004a1990 AssetPipeline: fix crash with meshes that already have TEXCOORD_4.
Fixes #1256.
2019-06-04 15:48:54 -07:00
Philip Rideout
0262a38c7e gltf_baker: fix radio button numbering 2019-06-04 15:48:54 -07:00
Philip Rideout
d3f784d4f9 gltf_baker: add vertex normals visualization 2019-06-04 14:36:03 -07:00
Philip Rideout
475cd80faf gltfio: consolidate buffer slots.
Instead of using the actual glTF attribute indices, we now pack them
so that unused indices do not take up any VertexBuffer slots.

Fixes #1256.
2019-06-04 14:35:51 -07:00
Philip Rideout
37ff2d903f Additional validation in VertexBuffer::Builder::build.
If a client asks for more than 8 buffers in a VertexBuffer, they will
either crash (release) or hit an assert in OpenGLDriver (debug). It's
better to catch this earlier.

This was noticed while investigating #1256.
2019-06-04 13:23:07 -07:00
Philip Rideout
a900851abc gltfio: add optional diagnostic shading. 2019-06-03 17:30:56 -07:00
Romain Guy
3ae91957be Reorder shader 2019-06-03 17:24:00 -07:00
Philip Rideout
be11944f99 gltf_baker: AssetPipeline now has an options struct. 2019-06-03 13:03:14 -07:00
Philip Rideout
f3a70d82cd gltf_baker: make denoise optional. 2019-06-03 13:03:14 -07:00
Philip Rideout
61423f6900 gltf_baker: dilate charts for bent normals. 2019-06-03 13:03:14 -07:00
Philip Rideout
29d2f51fca gltf_baker: make chart dilation optional. 2019-06-03 13:03:14 -07:00
Philip Rideout
bfaa2bdd4e gltf_baker: allow 3D visualization of mesh normals. 2019-06-03 13:03:14 -07:00
Philip Rideout
ce4a3edf7b gltf_baker: visualizers now use fp32 textures.
This allows us to skip the CPU-side vector-to-color conversion that
occured at the end, and makes the real-time visualization consistent
with the final visualization.
2019-06-03 13:03:14 -07:00
Philip Rideout
6c153b046f gltf_baker: allow visualization of mesh normals. 2019-06-03 13:03:14 -07:00
Philip Rideout
7a732eb9c4 gltf_baker: show the bounds of the asset
Parameterization can run into problems for very large, very small, or
off-center assets. Showingthe min/max helps users diagnose these issues.
2019-06-03 13:03:14 -07:00
Philip Rideout
fdfb8862eb gltf_baker: allow tmin adjustment. 2019-06-03 13:03:14 -07:00
Philip Rideout
8df3253955 Resurrect the denoiser.
This follows the convention of providing our own CMake files in the tnt
folder(s) and successfully builds with the -i option (install).
2019-06-03 10:39:56 -07:00
Philip Rideout
78ec315b69 Overhaul the gltf_baker UI.
As per the design doc, this makes the app somewhat usable by eliminating
hardcoded filenames, the hidden state machine, etc.
2019-06-03 08:32:48 -07:00
Philip Rideout
13fc64470a Add shader_ball in glTF 2.0 format. 2019-05-31 15:02:35 -07:00
Philip Rideout
97b5d43bd5 AssetPipeline: renormalize after baking transforms. 2019-05-30 16:03:13 -07:00
Philip Rideout
c2fcb39336 resgen: remove unused flag. 2019-05-30 16:02:55 -07:00
Mathias Agopian
4e718f592c fix typo in ashmem fallback code
There was typo that prevented the ashmem fallback code to work.
This became briefly a problem on Android Q before we fixed our
use of private APIs.
2019-05-30 13:39:09 -07:00
Romain Guy
d780e8b2a0 Add link_library(libc++.a) (#1245)
* Add link_library(libc++.a)

* Always link statically against libc++ and libc++abi on Linux
2019-05-30 11:49:03 -07:00
Romain Guy
e1b773958f Add screen and multiply blending modes (#1241)
* Add screen and multiply blending modes

This change also fixes a sorting issue: different sorting modes
were sorted in different buckets which is incorrect. We want
to sort only by distance.

* Update release notes and Java API

* Fix build error
2019-05-30 10:17:16 -07:00
Ben Doherty
326a67acdb Fix iOS README formatting 2019-05-30 10:01:56 -07:00
Ben Doherty
2c36d0aaae Add gLTF iOS sample (#1236) 2019-05-30 10:00:21 -07:00
Jack Diver
1b45f253eb Removed unnecessary nullptr guard from MeshReader::MaterialRegistry destructor. 2019-05-30 09:54:37 -07:00
nitronoid
7a2b5125ed Moved back to [] syntax, works for exisitng string keys now. 2019-05-30 09:54:37 -07:00
nitronoid
da39dbcb57 Fixed move constructors for MeshReader::MaterialRegistry 2019-05-30 09:54:37 -07:00
Philip Rideout
fab70e878a Repair redball tutorial.
Our GitHub Pages site is currently using an older version of the
filament wasm file so we should avoid using the new API here.
2019-05-30 09:34:08 -07:00
Jack Diver
0d2fe62d68 Fixed enum scoping in DriverEnums.h to allow compilation with gcc (#1244) 2019-05-30 09:05:18 -07:00
Philip Rideout
bafa62cdec Repair the install target, disable denoise.
This rolls back denoise functionality to repair install builds.
Will investigate a proper fix by authoring a tnt/CMakeLists.
2019-05-29 15:41:34 -07:00
Ben Doherty
fd318826c5 Update spirv-cross (#1238) 2019-05-29 15:16:02 -07:00
Mathias Agopian
5403a19076 compute the projection scale properly.
It used to be hard-coded, which meant the size SAO radius changed with
the screen resolution.
2019-05-29 13:08:41 -07:00
Ben Doherty
89c4647c3c Expose gltfio library so it can be used by third_parties (#1230) 2019-05-28 14:50:38 -07:00