Commit Graph
1610 Commits
Author SHA1 Message Date
Philip Rideout d313fe13fb Add deps to gltfio-android when Vulkan is enabled.
Note that these are SHARED rather than STATIC dependencies.

Issue #1414.
2019-07-17 12:57:55 -07:00
Ben Doherty 4d41c9bde3 Update MaterialBuilder to handle post-process materials correctly (#1408) 2019-07-15 10:56:00 -07:00
Philip Rideout 6c4157767f Restore shadows to helmet web demo. 2019-07-15 09:43:01 -07:00
Ben Doherty 5cceda4155 Pass material domain, variant to ShaderGenerator (#1402) 2019-07-12 13:20:00 -07:00
Philip Rideout 8f45f4ec35 gltfio: Fix skinning offset.
Thanks @iamjinge for the fix.

Fixes #1405.
2019-07-12 09:34:52 -07:00
Mathias Agopian f3e5b46bf9 highlight negative values in SH debug files 2019-07-11 22:45:49 -07:00
Mathias Agopian 497c544f33 fix sh generation when -d is used
When -d was used, the radiance and irradiance ended-up being
swapped in the final file.

Also rename g_coefficients to g_sh_coefficients.
2019-07-11 22:45:49 -07:00
Mathias Agopian 2e4a825fec clamp correctly when converting to RGB_11_11_10
This avoids artifacts with unclipped HDR environments.
2019-07-11 22:45:49 -07:00
Philip Rideout 244c83a77c gltfio JavaScript: add basePath argument to loadResources.
Fixes #1392
2019-07-11 17:52:02 -07:00
Philip Rideout 41e5bb4f78 Add demo for point sprites and custom attribs. 2019-07-11 14:59:16 -07:00
Philip Rideout 2265eca82d Update cgltf. 2019-07-11 14:52:48 -07:00
Ben Doherty 82c7e4d988 Add new post-process functions (#1400) 2019-07-11 14:06:26 -07:00
Philip Rideout 793198f96a Expose setSampleCount to JavaScript. 2019-07-11 12:18:32 -07:00
Philip Rideout f139589423 Update WebGL demos and docs on site. 2019-07-11 12:04:43 -07:00
Mathias Agopian f929b6cee7 New experimental filtering options to cmgen
--sh-window=band, -w band : this low-pass-filters the environment
such that bands above 'band' are zero. This can be used to reduce ringing
when the source environment has high frequencies

--noclamp : turns off clamping before processing the cube map


This is still work in progress.
2019-07-11 11:55:59 -07:00
Pixelflinger 4d6f8c281a fix IndirectLight::radiance()
The conversion factors from radiance to irradiance where wrong.

The bug above was found while refactoring the code to be clearer. Now
the method that computes the coefficients for the shader calls the
regular SH code and applies all the appropriate factors on that.

With this change the options "--sh-shader" and "-sh=3 -i" won't
produce the same result because --sh-shader includes the lambertian
diffuse. "--sh" now always produces actual SH coefficients.
2019-07-11 11:52:33 -07:00
Ben Doherty 943af435aa Handle GL_PROGRAM_POINT_SIZE correctly (#1396) 2019-07-11 10:51:50 -07:00
Ben Doherty f028af3186 Don't build all variants for Windows CI (#1394) 2019-07-11 10:49:51 -07:00
Ben Doherty b15abe9e5e Rename post-process generator functions (#1395) 2019-07-11 10:44:46 -07:00
Philip Rideout 5281f2a511 Enumerate all 8 custom vertex attribs. 2019-07-11 09:00:10 -07:00
Philip Rideout c2c546d671 Add support for custom vertex attributes.
This is a prep step for the upcoming morph feature and does not require
a bump to our material version number.

Stay tuned for a new sample app that demonstrates this feature.
2019-07-11 09:00:10 -07:00
Ben Doherty 6fc10c1dda Fix matc bug when compiling for multiple APIs (#1393) 2019-07-10 17:06:28 -07:00
Ben Doherty 80f3afaac6 Manually define PI to fix MSVC issue (#1388) 2019-07-10 16:23:26 -07:00
Ben Doherty 725c978545 Remove yOffset uniform (#1382) 2019-07-10 15:30:00 -07:00
Philip Rideout a9091570b7 OpenGL driver: allow point sprites on desktop.
I noticed that point sprites were working on mobile and web but not
desktop.  This is why.  :)
2019-07-10 12:39:01 -07:00
Philip Rideout 4e8dac2680 Re-enable shadows in helmet demo. 2019-07-10 09:13:03 -07:00
Ben Doherty da81e857a0 Correct spherical harmonics comments (#1375) 2019-07-09 16:16:30 -07:00
Mathias Agopian 111b3320c0 make sure we never execute a job smaller than requested 2019-07-09 16:12:15 -07:00
Mathias Agopian 665703dbd8 parallel_for now creates jobs in reverse order
this is because the JobSystem's queue works as a LIFO, by creating
jobs in reverse (memory) order, we attempt to help streaming to
the d-cache on that threads -- until the point where
jobs are stolen. 

we also execute the last job immediately instead of creating a job
for it -- since we're already in a job.
2019-07-09 16:12:15 -07:00
Pixelflinger 8170ca7cd1 improve JobSystem::parallel_for + minor optimizations
- parallel_for doesn't use recursion anymore to create the "leaf"
jobs, this is now done linearly on N thread (one thread per CPU).
This uses less stack space, and reduces miss-predicted branches.

- remove almost all SYSTRACE calls because they have a huge impact
on things like parallel_for() and are misleading. They can be
enabled again by setting HEAVY_SYSTRACE to true.
2019-07-09 16:12:15 -07:00
Mathias Agopian 2df639133b improvements to JobSystem
- we simplify the waiting code by using only a single
condition variable instead of two.

- wait() now behaves just like a looper, it will process jobs until
the one it's waiting for finishes -- before it could just sit there
(the idea was that the job would finish quickly, but that's not always
the case).

- we also make sure to never call notify_n() when it's not needed.
We track how many waiters we have and use that to decide if we need
to notify().

notify is pretty slow on all architectures, even on linux it's always
a syscall, so it's better to avoid it.

- don't use stand-alone fences, makes things ugly for no real benefit

- refactored the code a bit, hopefully it's more clear.
2019-07-09 16:12:15 -07:00
Mathias Agopian fc1d39334f separate SpinLock out of Allocator.h 2019-07-09 16:12:15 -07:00
Mathias Agopian af16e43830 add notify_n(int) to our condition variable
notify_n() wakes up n waiters, this is more fine grained than
notify_one() / notify_all(), and the implementation costs nothing.
2019-07-09 16:12:15 -07:00
Mathias Agopian 801c5b57a5 math::half is an arithmetic type even on msvc 2019-07-09 15:45:18 -07:00
Philip Rideout 19d7a3d21f Stop using DXT5 in web samples for the IBL.
Filament no longer decodes RGBM, so it's better to use a
floating-point format such as R11F_G11F_B10F.
2019-07-09 14:23:14 -07:00
Ben Doherty 6af77db79d Fix Android Toolchain issue on Windows (#1383) 2019-07-09 11:57:29 -07:00
Ben Doherty efb2f9a1d8 Fix windows build (#1384) 2019-07-09 11:56:36 -07:00
Romain Guy 3b3f52f48c Add Engine::destroy(Engine*) to match other APIs (#1377) 2019-07-08 14:22:13 -07:00
Ben Doherty ba5b9c733d Add shadow plane to hello-ar iOS sample (#1372) 2019-07-07 21:55:45 -07:00
Philip Rideout e009dbbf96 Minor updates to the webpack sample. 2019-07-03 15:32:01 -07:00
prideout 073a6c7696 Prepare for a new npm release. v1.3.0 2019-07-03 11:26:49 -07:00
Philip Rideout b30f6e5332 gltfio: JavaScript friendly error message for glb files. 2019-07-03 10:20:17 -07:00
Philip Rideout 384651e21a gltfio: fix JavaScript utility for glb files. 2019-07-03 10:20:17 -07:00
Philip Rideout 22dcdc770f gltfio: fix issue with bounding box computation.
If the client opts in to "recomputeBoundingBoxes", then we manually
compute a bounding box that ignores the glTF min / max annotations.

This computation was erroneously including the transform of the injected
root node, which is not part of the model.

This could cause a problem when creating the asset, then immediately
positioning it with its injected root node before the ResourceLoader
is done downloading vertex buffers.
2019-07-03 10:20:17 -07:00
Philip Rideout fd4d6c0d44 Use std::move in MeshAssimp.
Tested this via material_sandbox, seems to be fine.

Fixes #1366.
2019-07-02 14:20:55 -07:00
Philip Rideout ca5b52b2ce Add JavaScript / TypeScript support for RenderTarget. 2019-07-02 13:26:56 -07:00
Ben Doherty cc4e9db81b Fix spherical harmonics parsing (#1370) 2019-07-02 12:54:52 -07:00
Ben Doherty 2bfea16459 Update usage of KtxUtility in iOS projects (#1371) 2019-07-02 12:33:55 -07:00
Philip Rideout 927662ea4d Add JNI for KTX, simplify the bloom Android demo. 2019-07-02 11:02:45 -07:00
Ben Doherty 5b2dc1d3de Link against IBL library in iOS projects, update README (#1369) 2019-07-02 10:43:54 -07:00