Commit Graph

2965 Commits

Author SHA1 Message Date
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
Romain Guy
630f816e7a Remove iostream from GLX backend (#2774) 2020-07-07 11:29:12 -07:00
Ben Doherty
bbf37a5480 Add error message when parsing material with missing backend (#2766) 2020-07-06 11:29:01 -07:00
Ben Doherty
a07894ca9f Fix gltf_viewer crash when switching models with glTF cameras (#2767) 2020-07-06 11:28:36 -07:00
Mingwei Samuel
e03c663bc3 filament.d.ts make init, fetch callbacks optional 2020-07-04 09:20:51 -07:00
Ben Doherty
1af254db43 Add matc support for command-line preprocessor defines (#2760) 2020-07-01 10:42:46 -07:00
Philip Rideout
7621f7e830 Vulkan: fix SSAO by removing bogus workaround.
This fix has the side effect of causing a validation warning due to
a declared fragment shader output that has no corresponding attachment.
We can fix that in a future PR.

Fixes #2752
2020-06-30 16:59:03 -07:00
Philip Rideout
d7cd247dfc matdbg: auto-select variant when clicking a material.
The UI was in a weird state after the user selected a new material but
before they had chosen a particular variant. The highlighted
material did not match the content of the source editor.
2020-06-30 16:56:19 -07:00
Philip Rideout
9a58bf2460 matdbg: support scenes that have many materials.
We now download shader source only after the user selects a variant.
Previously we tried to download all shaders at once. This caused Chrome
to throw ERR_INSUFFICIENT_RESOURCES.

Fixes #2759
2020-06-30 16:56:19 -07:00
Philip Rideout
7ee1279792 Vulkan: add diagnostics to check if format is sampleable.
Motivated by #2752.
2020-06-30 12:43:45 -07:00
Ben Doherty
7131bbf62c Fix VS 2019 build failure with Vulkan (#2758) 2020-06-30 11:29:00 -07:00
Michael Lou
820f551eea filamat: Resolve string processing inefficiency (#2754)
Co-authored-by: Michael Lou <ylou@amazon.com>
2020-06-30 10:39:31 -07:00
Ben Doherty
a6872c840c Silence more deprecation warnings (#2750) 2020-06-30 10:14:57 -07:00
Philip Rideout
c0452b5e9d JS: Update API for Camera construction / destruction. 2020-06-29 18:35:24 -07:00
Philip Rideout
b136b4aca5 JS: Temp workaround for bloom binding error. 2020-06-29 18:35:24 -07:00
Philip Rideout
59cf9e3b75 JS: Fix typo in bindings for bloom options. 2020-06-29 18:35:24 -07:00
Pixelflinger
7ca508cb7a ssao: optimize sin/cos per sample
We now get away with a sin/cos per fragment instead of per-sample,
this increases a little bit the ALU load but decreases the EFU's.
This is not necessarily faster, but sin/cos may cost more power or
have longer latencies.
2020-06-29 17:46:53 -07:00
Philip Rideout
96feea1dee Avoid deprecated API in the root README. 2020-06-29 15:12:52 -07:00
Philip Rideout
c5acacff67 Vulkan: add note about #1532. 2020-06-29 12:36:47 -07:00
Ben Doherty
92f2004c4b Improve matc error reporting (#2741) 2020-06-29 11:21:56 -07:00
Pixelflinger
aed8c7fcb4 DoF: make all function parameter const
glslang generate much less code when function parameters are marked
const (it also works around a bug where highp intermediate variables
are introduced -- but this will be fixed soon).

Also remove non-trivial uses of ?: as it also triggers a similar problem 
in glslang.
2020-06-29 10:45:08 -07:00
Philip Rideout
29f50e0feb Vulkan: fix intermittent InvalidQuery on Android.
This prevents the following validation error:

    Cannot get query results on queryPool 0x2 with index 0 as data has
    not been collected for this index.

This was occasionally triggered when we attempted to query a timer that
had not yet been inserted into any command stream. (The error seems
bogus to me since we've enabled the AVAILABILITY flag, but we might as
well fix it anyway.)
2020-06-28 04:43:06 -07:00
Romain Guy
2aeb33b260 Fix Windows build 2020-06-26 23:20:23 -07:00
Romain Guy
132e94b3bb Add vignette post-processing effect (#2743)
* Add a vignette post-processing effect

* Use numeric limits instead of hard coded values
2020-06-26 17:44:17 -07:00
Romain Guy
f7f86a7c56 Remove skygen
This will be replaced by a runtime implementation. skygen was
never finished to begin with.
2020-06-26 17:25:08 -07:00
Ben Doherty
4a3984692a Flush pending command buffer in Metal terminate (#2737) 2020-06-26 11:38:56 -07:00
Philip Rideout
c87cffd57a Transition to PRESENT layout only once per frame. 2020-06-25 19:50:34 -07:00
Philip Rideout
4bbc0c05c4 Allow LOAD_OP_LOAD when rendering to swap chain. 2020-06-25 19:50:34 -07:00
Philip Rideout
697b1b6907 Fix intermittent InvalidImageLayout error for main depth buffer. 2020-06-25 19:50:34 -07:00
Mathias Agopian
d3f5164fcb New DoF implementation (#2700)
This implementation is an order of magnitude more efficient, running
in about 6ms on Pixel 4.

We're using the ring binning technique described in "Life of a Bokeh",
SIGGRAPH 2018.
2020-06-25 16:37:16 -07:00