Commit Graph

2994 Commits

Author SHA1 Message Date
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
Ben Doherty
2516484566 Add HelloCocoaPods iOS sample (#2795) 2020-07-10 17:05:54 -07:00
Ben Doherty
c91d02ab29 Add bluevk.lib to Windows README (#2796) 2020-07-10 13:16:45 -07:00
Philip Rideout
41f7ea436d Update the descriptor set index in colorGrading. 2020-07-10 10:19:06 -07:00
Romain Guy
b224916f09 Prevent crash if the glTF doesn't have animations 2020-07-09 17:23:06 -07:00
Philip Rideout
38d2509aaf Web tutorials now use a CDN for the npm package.
This makes the tutorials more consistent with the live demos and lets us
more easily ensure that the tutorials are kept up to date without
errors. In fact it caught an error in the Suzanne tutorial.

Since this affects source rather than served files, this PR is intended
for main.  The master branch will be updated in a subsequent PR.
2020-07-09 14:56:05 -07:00
Ben Doherty
185ed0cc68 Add Filament Podspec (#2788) 2020-07-09 12:43:24 -07:00
Philip Rideout
5d2b12b9a6 Fix javadoc syntax error. 2020-07-09 12:12:41 -07:00
Romain Guy
77aec40a56 Prepare Filament v.1.8.0 (#2787) v1.8.0 2020-07-09 11:44:15 -07:00
Philip Rideout
25d42c939d filagui: publicize the low-level draw data handler.
The existing API was fine for FilamentApp but it prevented clients from
making ImGui calls from arbitrary places, which forced them in some
cases to queue up their ImGui calls using vector<function<>>.

This PR publicizes the low-level method that consumes the ImGui draw
list and removes calls to global functions.
2020-07-09 11:31:36 -07:00
Philip Rideout
1ad6bccbc2 Vulkan: add support for input attachment descriptors.
This is step 1 for supporting subpasses (aka framebuffer fetch).

Vulkan requires us to explicitly bind the shader to any framebuffers
that we read from. These are called input attachments in Vulkan
parlance, and each binding is called a descriptor.

For simplicity we only create homogeneous descriptor sets where each
descriptor set is comprised of only one type of binding (i.e. all
uniforms or all samplers). I see no reason to break with that
architecture right now, so input attachments live in their own set.
In the long term, we should probably think about partitioning
descriptors differently (e.g. according to their frequency of change).

This PR also renames some internal fields in order to avoid nomenclature
confusion, such as `mDescriptorSets` => `mDescriptorBundles` . Each
entry in this map is a set of descriptor sets, or what we are now
calling a "bundle".
2020-07-09 11:26:06 -07:00
Ben Doherty
3c1ea07502 Add Metal support for Texture::import (#2782) 2020-07-09 10:39:22 -07:00
Philip Rideout
07e4d1c148 Fix TypeScript error for the Render Fidelity folks. 2020-07-09 07:49:22 -07:00
Pixelflinger
1816883428 Some infrastructure to support arbitrary shaped diaphragm
This is still work in progress and disabled.
2020-07-08 17:18:40 -07:00
Pixelflinger
6a6775ebec fix typo in IBL computation comment 2020-07-08 17:18:18 -07:00
Romain Guy
767764e4ff Swizzle textures when swizzle is enabled, not the other way around (#2779)
Fixes #2777
2020-07-08 13:33:09 -07:00
Philip Rideout
d3f6ce6990 Minor fixes for "matinfo --web-server" 2020-07-08 13:15:28 -07:00
Philip Rideout
96032eada5 Vulkan code cleanup. 2020-07-08 11:04:04 -07:00
Philip Rideout
c8aad378c4 Vulkan: add support for MRT. 2020-07-08 11:01:43 -07:00
@roxlu ☾
c067d76d1d Add View::getVisibleLayers() 2020-07-08 09:24:55 -07:00