Commit Graph

3013 Commits

Author SHA1 Message Date
Philip Rideout
2f4dd0bbd4 sample-page-curl: add comments to variables, etc. 2020-07-27 07:35:58 -07:00
Pixelflinger
e34db6fc29 fix a few issues with color grading
- we were not clamping the color grading output to [0,1]

- we were not using a supported input (cpu) pixel format for the
  3d LUT in low and medium quality
2020-07-24 17:24:51 -07:00
Pixelflinger
087e2480d1 DoF: fix tiles dilate pass edges
We were using texelFetch which doesn't handle wrap modes, and this
resulted in all edge tiles to be undefined. Use textureLod() instead.
2020-07-24 11:38:26 -07:00
Ben Doherty
45efe2df75 CSM: allow setting individual split positions (#2835) 2020-07-24 11:04:28 -07:00
Ben Doherty
85ae21fa26 Remove Google-style line directives in filamat lite (#2860) 2020-07-24 11:04:01 -07:00
Pixelflinger
77939ad269 DoF: improve quality in "fast tiles"
fast tiles (i.e. where all pixels have the same circle-of-confusion)
are allowed to use bilinear filtering.
this results in better looking DoF in these areas.
2020-07-23 22:49:13 -07:00
Tim Psiaki
4a59e6e1ce Fix node hierarchy corruption when a node is set to parentless. 2020-07-23 22:48:40 -07:00
Pixelflinger
ca68ef22e1 update glslang to latest
glslang repo SHA: f3cb1896971f449706bb1df5053d0e8fad6b0675


This fixes another highp bug.
2020-07-23 16:11:14 -07:00
Pixelflinger
7067500a9c DoF: improve quality
Using a ring density of 4 was wrong -- apparently I can't add.
With a density of 8 we can guarantee we don't have gaps between samples
when using mips properly (or at least gaps are consistant and 
predictable).
2020-07-23 13:52:24 -07:00
Romain Guy
6ed1fb3b7b Add quality option to ColorGrading (#2858)
* Add quality option to ColorGrading

Low: 16x16x16 LUT in 10 bit
Medium: 32x32x32 LUT in 10 bit
High: 32x32x32 LUT in 16 bit
Ultra: 64x64x64 LUT in 16 bit

* Move comment
2020-07-23 13:49:01 -07:00
Romain Guy
1613c1bb0e Ensure we respect the desired size on layout change (#2859) 2020-07-23 12:45:02 -07:00
Richard Chang
1162ae4ddc Fix typo in SurfaceOrientation jni wrapper (#2853) 2020-07-23 09:06:26 -07:00
Ben Doherty
a25179b91e Update imgui to v1.77 (#2834) 2020-07-22 16:15:31 -07:00
Pixelflinger
81388ab4b4 DoF: bug fixes and quality improvements
- Use the random offset to calculate the correct intersection radius.
  For the center sample, the ring radius is otherwise zero, which means
  any sample in the random disk with a CoC radius > 0 would intersect,
  and that seems wrong.

- The selected mip was off by one.
  We were always picking a mip too high because the CoC are in
  high resolution, but our mip-chain is 1/4 res from that.
  This improves rendering quality quite a lot.
2020-07-22 15:22:28 -07:00
Pixelflinger
ec9fd58fc0 use more inclusive language 2020-07-22 15:20:54 -07:00
Ben Doherty
b786b486b6 Add getCullingProjectionMatrix JNI method (#2847) 2020-07-22 15:12:03 -07:00
Romain Guy
06b191cd53 Fix broken IBLs (#2850) 2020-07-22 14:02:49 -07:00
Philip Rideout
cd168148d8 gltfio for web: add and use destroyAsset.
Fixes #2839.
2020-07-22 13:40:08 -07:00
Philip Rideout
0da20cccdc Introduce removeEntities API / fix leak in ModelViewer (!)
For testing purposes, sample-gltf-viewer reloads the model when the
user double-taps the screen. This operation was causing a buildup of
blank entities in the Scene, because we were merely destroying the
components, not removing them from the Scene.
2020-07-22 13:38:38 -07:00
Aleksi Sapon
ecbdeb9e6d Remove case KtxBundle::R11F_G11F_B10F in toPixelDataFormat 2020-07-22 13:20:54 -07:00
Aleksi Sapon
e14c8258f7 Fix KTX texture format for latest version 2020-07-22 13:20:54 -07:00
Philip Rideout
3862b44ef4 gltfio: Add support for KHR_materials_transmission.
This chooses type=THIN, mode=SCREENSPACE, and blending=TRANSPARENT.

Due to sampler overload, we print a friendly error message and enable a
fallback if the user tries to simultaneously enable ubershader mode, the
clearcoat extension, and the transmission extension.
2020-07-22 08:40:55 -07:00
Romain Guy
f3ed31b5a0 Don't recompute the color grading LUT every frame in sandbox 2020-07-20 17:08:22 -07:00
Romain Guy
06f4920033 Don't recompute color grading LUT on every frame 2020-07-20 16:56:26 -07:00
Ben Doherty
b0c11c17e9 Add outputs block to material definition (#2823) 2020-07-20 16:48:00 -07:00
Pixelflinger
27c4174abd DoF: fix many quality/performance issues
- make sure all downsampling is exactly correct and use proper
  uv values to access these textures. This stabilizes the DoF a bit.

- for now only use NEAREST filtering, as bilinear can't be used naively.

- noise is now mandatory, fix noise radius

- add a median pass (performance is not impacted because DoF is faster
  due to using NEAREST filtering)

- fix  be consistant in how the kernel radius is computed, fix a couple
  errors in that area.

- change ring density from 8 to 4 (but starting with 8), so each new
  ring is 4 samples larger than the previous. This reduces the number
  of samples needed from 25 to 21 on mobile, and 49 to 37 on desktop. 
  It also makes it conceivable to use 5 rings (57 samples). Quality is
  not visibly impacted because the center ring is still 8 samples.
  This density, matches the number of samples required for "square"
  rings.

- fix scaling issue with diaphragm simulation

- fix typos in background accumulation code -- this fixes a lot of 
  quality issues.

- improve performance of "fast tiles" during both DoF and combine passes

Overall the effect runs about 0.5ms faster and quality is greatly
improved.
2020-07-20 12:58:11 -07:00
Philip Rideout
71f256585d Update cgltf (includes transmission ext). 2020-07-20 12:04:51 -07:00
Pixelflinger
710f83dcf5 Enable specular anti-aliasing in gltfio 2020-07-19 22:14:51 -07:00
Mingwei Samuel
36b3cc7bf0 Filament.d.ts: add Vector<T> interface, vectorToArray<T> fn, fix getResourceUris() return vec 2020-07-18 10:50:44 -07:00
Romain Guy
c6d9d4a9ae Update AGP, NDK and androidx.core (#2826) 2020-07-17 09:24:33 -07:00
Philip Rideout
665b198db0 Vulkan: add support for subpasses. 2020-07-15 17:39:29 -07:00
Philip Rideout
9f267de1b7 Fix garbage in "Exceeded max sampler" message.
uint8_t is char, so it makes junk on the screen and wakes up your dog
with beeping sounds.
2020-07-15 13:54:56 -07:00
Pixelflinger
5c71b0eae2 update glslang to latest
This fixes a lot of issues regarding precision qualifiers.

This should resolve cases where "highp" were introduced needlessly.
2020-07-14 23:24:50 -07:00
Pixelflinger
e58043f156 update spire-cross to latest
This fixes an issue where "expensive" operations can be moved to
inside loops.
2020-07-14 23:24:31 -07:00
Philip Rideout
c6a8ad9fbe Refactor colorGradingSubpass to fix #2780. 2020-07-14 19:25:43 -07:00
Romain Guy
97e8035b40 Give materials unique names 2020-07-14 15:57:56 -07:00
Philip Rideout
1d474b30b9 Add simple subpass support to the Driver API.
This makes two changes to the Driver API:
1. Adds the beginSubpass() method.
2. Adds subpassMask to RenderPassParams.

Locally I've proven that this PR is sufficient by making a series of
Vulkan changes; sneak peek is available at commit
bfef6914a7d288bbd25926c02ec93d231a8c0d07.

Note that this PR moves the new usage flag to a different texture;
I had placed it on the wrong one.

See also #2780.
2020-07-14 14:48:24 -07:00
Romain Guy
4c81bb0158 Fix material parameters enum (#2814)
* Fix material parameters enum

Fixes bug #2812

* Add  missing sampler type to filamat
2020-07-14 09:29:20 -07:00
Mingwei Samuel
a2e5cacee0 Filament.d.ts: Add BufferReference type alias, update to accept typed arrays
- buffers processed by getBufferDescriptor can be an asset string or JS typed array.
  - 185ed0cc68/web/filament-js/extensions.js (L17-L27)
2020-07-13 20:56:12 -07:00
Ben Doherty
7cfc2c9f24 Set Filament iOS support to iOS 11 (#2809) 2020-07-13 18:04:47 -07:00
Ben Doherty
fec214a772 Include Filament version instead of date in release assets (#2808) 2020-07-13 17:23:36 -07:00
Philip Rideout
6eac638fd2 Remove old method for JS doc generation.
The new way is to follow the instructions at the top of
`web/docs/build.py`.

The option in build.sh has been unused for a while. Invoking Python from
CMake was pointless, especially since I don't want to force other
developers to install a specific version of Python etc.
2020-07-13 16:07:49 -07:00
Philip Rideout
dc891f7299 CMake: specify -fPIC at root level.
Fixes #1881.
2020-07-13 16:07:07 -07:00
Ben Doherty
7c4661cc6b Fix glTF camera aspect ratio (#2807) 2020-07-13 14:42:26 -07:00
Ben Doherty
c7b6d45958 Add CocoaPods tutorial to site (#2798) 2020-07-13 14:41:56 -07:00
Max Rebuschatis
c0bf8fa83b NoopDriver now uses ShaderModel::GL_ES_30 on WASM 2020-07-13 13:39:53 -07:00
Philip Rideout
4fa987c698 WebGL: Upgrade emsdk and refactor initialization.
Since postRun can no longer be set from within the extern post JS, we
now use the promise rather than postRun.

This upgrades emsdk to 1.39.19 (see note in #2800).
2020-07-13 13:02:26 -07:00
Philip Rideout
ec533e6047 DriverEnums: add usage flag for SUBPASS_INPUT 2020-07-11 09:22:28 -07:00
Pixelflinger
bdf1272942 update comments to reflect code change 2020-07-11 01:03:20 -07:00
Benjamin Doherty
2e8a80f726 Fix, add xcsharedata for HelloCocoaPods sample, removal MetalKit 2020-07-10 18:00:57 -07:00