Commit Graph

2950 Commits

Author SHA1 Message Date
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
Pixelflinger
8882132f43 fix a use after free in filamat
This would happen when using math -E -a vulkan. GLSLangCleaner lifetime
must be shorter than TProgram/TShader.
I think we can fix this by using another scoped GLSLangCleaner.

Tested successfully with ASAN.
2020-06-25 12:20:16 -07:00
Ben Doherty
89a8592714 Fix, incorrect camera view matrix with non-rigid transformations (#2735) 2020-06-25 11:22:09 -07:00
Philip Rideout
9d35aff2d3 Vulkan: fix bloom on Android by supporting LOAD_OP_LOAD.
If a render target attachment is not cleared or discarded, then it
should be preserved and therefore requires VK_ATTACHMENT_LOAD_OP_LOAD.
2020-06-24 22:33:57 -07:00
Romain Guy
c6e7382cb9 Update README.md 2020-06-24 16:30:23 -07:00
Mingwei Samuel
0be094cd4f Update TypeScipt declarations
- Add missing LightManager$Builder methods.
- Fix IcoSphere.tangents type to be unsigned.
- Add missing IcoSphere.suvdivide() method.
2020-06-24 15:37:15 -07:00
Ben Doherty
81c60c4efa Remove use of deprecated APIs in libfilamentapp (#2729) 2020-06-24 10:47:42 -07:00
Pixelflinger
456e057754 texelFetch w/ LOD requires at least MIPMAP_NEAREST
if NEAREST or LINEAR min filter is used, texelFetch is actually
undefined when the LOD is not 0.
2020-06-23 18:23:16 -07:00
Ben Doherty
ab12881888 Remove camutils dependency on utils (#2727) 2020-06-23 15:28:20 -07:00
Philip Rideout
efaf02ca61 CMake: fix macOS build break. 2020-06-23 15:19:04 -07:00
Philip Rideout
8f7b25088d CMake: build matdbg / civetweb only when enabled.
Also group FILAMENT_ENABLE_MATDBG with all our other CMake options.
2020-06-23 15:19:04 -07:00
Philip Rideout
8f4ffbc782 gltfio: various improvements to skinning normalization.
- Allow JavaScript and Java / Kotlin clients to configure this setting.
- Opt in by default (this was disabled in #2621)
- Optimize large assets like Bistro by iterating through prims only when
  the asset actually has skins.

Fixes #2714.
2020-06-23 13:30:45 -07:00
Mingwei Samuel
455bed917b Fix typescript missing options parameter for createTextureFromX 2020-06-23 09:25:44 -07:00
Ben Doherty
d5033b5857 Silence warnings in public headers (#2722) 2020-06-22 16:56:55 -07:00
Philip Rideout
cf5b6ccba3 Use MAX_MORPH_TARGETS instead of magic number. 2020-06-22 16:02:12 -07:00
Philip Rideout
42c80d5d5e Fix CUBICSPLINE interpolation for morph weights.
Tested with Polly the robo-hound and ensured that InterpolationTest
did not regress.

Partial fix for #2714.
2020-06-22 16:02:12 -07:00