Commit Graph

880 Commits

Author SHA1 Message Date
Ben Doherty
4cb903a09e Fix variant-limiting bug in matdbg (#2903) 2020-08-03 11:16:33 -07:00
Philip Rideout
3ca0a8cd8d Transmission should use FADE. (#2908)
Fixed #2907.
2020-08-03 10:51:26 -07:00
Philip Rideout
2c18d7f576 Revert "Transmission should use FADE."
This reverts commit 379f92417f.
2020-08-03 10:45:46 -07:00
Philip Rideout
379f92417f Transmission should use FADE.
Fixed #2907
2020-08-03 10:44:15 -07:00
Ben Doherty
13574f793c Run MergeReturnPass only on mobile (#2901) 2020-07-31 18:40:47 -07:00
Ben Doherty
a4e3e0c2d1 Ignore commented-out #includes in material files (#2897) 2020-07-30 18:46:16 -07:00
Ben Doherty
1a85c93894 Fix DEBUG identifier used in Log.h (#2895) 2020-07-30 16:43:42 -07:00
Philip Rideout
b4623c9afc Add lightroom IBL, enable ColorGrading by default in gltf_viewer.
The non-legacy ACES is now default, it looks much better.

I also tested this IBL with WebGL and Android.
2020-07-30 11:39:36 -07:00
Philip Rideout
8f3f30e9cd gltfio: fix depth writes for transmissive materials.
This fixes the depth fighting in the column of red spheres in the test
model while in filamat mode. Thanks Romain for catching this.

It also makes filamat mode more consistent with ubershader mode.
2020-07-29 11:55:21 -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
ec9fd58fc0 use more inclusive language 2020-07-22 15:20:54 -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
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
Ben Doherty
b0c11c17e9 Add outputs block to material definition (#2823) 2020-07-20 16:48:00 -07:00
Pixelflinger
710f83dcf5 Enable specular anti-aliasing in gltfio 2020-07-19 22:14:51 -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
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
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
Pixelflinger
6a6775ebec fix typo in IBL computation comment 2020-07-08 17:18:18 -07:00
Philip Rideout
d3f6ce6990 Minor fixes for "matinfo --web-server" 2020-07-08 13:15:28 -07:00
Ben Doherty
1af254db43 Add matc support for command-line preprocessor defines (#2760) 2020-07-01 10:42:46 -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
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
Ben Doherty
92f2004c4b Improve matc error reporting (#2741) 2020-06-29 11:21:56 -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
81c60c4efa Remove use of deprecated APIs in libfilamentapp (#2729) 2020-06-24 10:47:42 -07:00
Ben Doherty
ab12881888 Remove camutils dependency on utils (#2727) 2020-06-23 15:28:20 -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
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
Philip Rideout
2b92b5e060 gltf_viewer: move "Animation" UI
The Animation selector is now a top-level group (collapsed by default),
previously it was in the Hierarchy group, which was non-intuitive.

Also:

- Use indent() for consistency with other UI groups.
- Remove un-necessary usage of a lambda.
2020-06-22 15:43:35 -07:00
Philip Rideout
6b5d21639e gltf_viewer: collapse all UI panels by default 2020-06-18 12:54:45 -07:00
Philip Rideout
5c64ed5125 gltfio: use highp for UV coords.
Fixes #2500.
2020-06-17 17:27:53 -07:00
Philip Rideout
ebd195f8e4 matdbg: Add support for Android.
See the matdbg README for details.
2020-06-14 22:42:55 -07:00
Romain Guy
a2ce57ade3 Fir applyAnimation() when scale is close or equal to 0 2020-06-13 14:48:07 -07:00
Romain Guy
a019de3363 Add (improved) color grading UI to gltf-viewer (#2676) 2020-06-12 08:30:43 -07:00
Ben Doherty
fde2d2e483 Fix MeshReader material bug (#2674) 2020-06-11 14:49:25 -07:00
Ben Doherty
b2c63b6cd2 Add support to gltfio for glTF cameras (#2663) 2020-06-11 13:57:01 -07:00
Philip Rideout
1f9d073a64 gltfio: enable unused UV attributes when possible.
Reproduced the issue by hacking the TexturedCube glTF file.

Verified the fix by viewing TexturedCube in ubershader mode, then
hacking the shader with matdbg in order to visualize texture
coordinates.

Fixes #2659
2020-06-11 12:05:43 -07:00
Philip Rideout
fa0f5e0501 Prep the build for multi-platform matdbg. 2020-06-10 20:00:24 -07:00