Commit Graph

841 Commits

Author SHA1 Message Date
Philip Rideout
4e0749f0ae Add another folder to the build's "clean" task.
Gradle creates a hidden .externalNativeBuild folder when issuing CMake
for the first time. This folder contains cached command line parameters
that get passed to CMake, and these can become stale when switching
between "normal" Android builds and Vulkan-enabled Android builds, which
leads to frustrating build errors.
2019-01-23 17:12:56 -08:00
Ben Doherty
f5bd28b7df Update linux README with CXXFLAGS (#736) 2019-01-23 16:39:34 -08:00
Ben Doherty
ad4c4148f4 Add filamat-jni Gradle project (#733) sceneform-1.7pr3 2019-01-23 13:58:43 -08:00
Mathias Agopian
a35762bdf2 compute discard flags for all attachments 2019-01-22 10:49:22 -08:00
Mathias Agopian
1ca2b1b642 calculate rendertarget's discard flags properly 2019-01-22 10:49:22 -08:00
Mathias Agopian
373e519292 slog.* << io::hex now prefixes values with 0x 2019-01-22 10:49:22 -08:00
Mathias Agopian
acea32aae8 more validation in the framegraph
- validate that a pass actually uses a resource when requesting the
  concrete (Driver) handle.

- introduce a "blit" usage for a resource, which indicates that a 
  resource will be used as the source of a blit operation. This is
  unfortunatelly needed because blit operations work on rendertargets,
  not textures for the source.
2019-01-22 10:49:22 -08:00
Mathias Agopian
150fd321bc FrameGraph API improvements
- de-dup read/writes to the same resource from the same pass

- also, when reading & writing into the same resource from the same pass,
  always order the read before the write, i.e.:
     out = builder.write(r);
     in  = builder.read(out);
  is equivalent to:
     in  = builder.read(r);
     out = builder.write(in);

  note that the following is still not allowed:
     out = builder.write(r);
     in  = builder.read(r);
  
  this is never valid, since it's reading from a resource that has
  been written to. 


- Make FrameGraphResource class attributes private and add
  comparison operators (so they could be sorted and compared).
2019-01-22 10:49:22 -08:00
prideout
1bbe203a15 Add RGB support to VulkanDriver. 2019-01-22 09:56:27 -08:00
prideout
37201e742f Add missing locks to VulkanDriver. 2019-01-18 16:50:52 -08:00
prideout
ba8adc2d49 Fix test filter syntax. 2019-01-18 16:21:26 -08:00
Ben Doherty
d3efbd810e Add Android build instructions on Windows (#726) 2019-01-18 14:47:23 -08:00
prideout
91c946cfbd Add workaround for depth invariance on NVIDIA.
Fixes #645.
2019-01-18 13:59:22 -08:00
prideout
98d39b7e7e Revert "Fix depth prepass (#722)"
This reverts commit 896c85c324.
2019-01-18 13:59:22 -08:00
Mathias Agopian
e7169cb889 fix CI build 2019-01-18 13:55:19 -08:00
Mathias Agopian
8f70f8f879 fix a few typos 2019-01-18 13:07:54 -08:00
Mathias Agopian
8c6ac11c2d Optionally use the framegraph for post-processing
There is still a lot of work to do on the frame-graph, which is why
this is off by default for now.
2019-01-18 13:07:54 -08:00
Mathias Agopian
d9bebaa8e7 framegraph now supports imported resources 2019-01-18 13:07:54 -08:00
Mathias Agopian
5baa699c7c Add support for creating concrete resources
- Tweak the API a bit.
- We can now create concrete textures and render-targets
2019-01-18 13:07:54 -08:00
Mathias Agopian
8c8cfb6528 Frame graph API
This is only the guts of the frame graph implementation. It supports
culling of passes, but doesn't create real resources yet.

API still in flux.
2019-01-18 13:07:54 -08:00
Mathias Agopian
f1c6acafff Tweak to PostProcessManager::setSource()
setSource() is a bit more generic now.
2019-01-18 13:07:54 -08:00
Philip Rideout
03161226f2 Update MoltenVK and tweak queue selection strategy.
These changes are sufficient to resurrect Vulkan-on-macOS, at least for
the vk_hellopbr sample.
2019-01-18 12:21:50 -08:00
Ben Doherty
4d0859b266 Update Android toolchains for building on Windows (#723) 2019-01-18 09:31:03 -08:00
Romain Guy
896c85c324 Fix depth prepass (#722)
The engine tries to be smart by using a single vertex shader when
rendering unskinned, non-alpha masked, non-customized materials.
This leads to a lot of issues when laying down the depth prepass.
This change simply gets rid of this optimization (which wasn't
properly profiled anyway). Correctness is more important.

Fixes #645
2019-01-17 17:57:43 -08:00
Philip Rideout
49f1464016 Fix diabolical VAO state management bug.
When clients deleted renderables that referred to index buffers that
were still active, it was possible for our shadow ELEMENT_ARRAY_BUFFER
binding to get out of sync with the actual binding.

It is somewhat amazing that this has never caused issues before. Perhaps
it is rare for clients to "recycle" index buffers across multiple
renderable lifetimes.

This fixes #718.
2019-01-17 14:44:34 -08:00
Romain Guy
c8b3544a36 Update README 2019-01-17 12:13:43 -08:00
Romain Guy
321845d04a Update README 2019-01-17 12:11:20 -08:00
Romain Guy
a31928600e Update README 2019-01-17 12:10:39 -08:00
Romain Guy
f3752a42c8 Document UV flipping behavior and add control attribute (#720)
Materials can disbale this behavior by setting flipUV: false
in the header section of the material definition.

Fixes #672
2019-01-17 11:12:16 -08:00
Philip Rideout
2f35f26148 VertexBuffer builder normalized now accepts "false". 2019-01-17 06:09:17 -08:00
Philip Rideout
d47e6f9456 Remove presubmit test. 2019-01-16 16:28:30 -08:00
Philip Rideout
6bb385f354 Repair web builds, second attempt. 2019-01-16 16:26:57 -08:00
Philip Rideout
dd7af66516 Repair kokoro web builds. 2019-01-16 15:56:37 -08:00
Philip Rideout
04f3268961 Introduce test to ensure buildability of TypeScript declarations. 2019-01-16 14:31:42 -08:00
Philip Rideout
a3c939894c Add more JavaScript bindings and TypeScript annotations.
The following type bindings are now complete:

 - RenderableManager
 - RenderableManager$Builder
 - RenderableManager$Bone
 - TransformManager
 - Box, Camera, Frustum
2019-01-16 14:31:42 -08:00
Ben Doherty
b460d2f547 Fix resizing metal layer crash with OpenGL (#713) 2019-01-16 11:55:51 -08:00
Ben Doherty
9ea81bc2fd Resize Metal layer (#710) 2019-01-15 16:51:09 -08:00
Romain Guy
cebc83e8fa Fix the Android filamesh file loader (#709)
* Fix the Android filamesh file loader

The loader was not updated to support the SNORM16 format now sometimes
used to encode UV sets in filamesh files.

Fixes #708

* Update android/samples/image-based-lighting/app/src/main/java/com/google/android/filament/ibl/MeshLoader.kt
2019-01-15 16:11:34 -08:00
Ben Doherty
b3cd6a7f59 Add initial MaterialBuilder JNI (#707)
* Add initial MaterialBuilder JNI

* Move into android/filamat-android
2019-01-15 16:07:42 -08:00
Romain Guy
c8f5190099 Fix Windows build 2019-01-15 15:13:13 -08:00
Romain Guy
28ab087f79 Revert doubleSided hack in glTF loading 2019-01-15 14:17:22 -08:00
Romain Guy
e66aeb0c94 Fix a couple of glTF issues: (#706)
- baseColorFactor.a was not taken into account
- Some glTF files do not set `doubleSided` properly, so here we assume
  that non-opaque materials are double-sided. We may need to revisit
  this decision later...
2019-01-15 10:26:20 -08:00
Philip Rideout
749817b64b Add the official TypeScript annotations for gl-matrix to third_party.
Filament supports (but does not require) gl-matrix, and our TypeScript
annotations will need to use this file to support clients that use
gl-matrix.
2019-01-15 23:22:06 +05:30
Philip Rideout
1b18724b6b Add TypeScript to Kokoro for web for testing.
This preps for an upcoming regression test that ensures our TypeScript
annotations are valid.
2019-01-15 23:21:57 +05:30
Romain Guy
ff5a2a7a99 Peek the right dimensions for the IBL in Android samples (#704)
Fixes #701
2019-01-15 09:47:41 -08:00
Philip Rideout
125f79e5e0 Allow Java / Kotlin to enable the experimental Vulkan backend.
We still do not compile the Vulkan backend for Android by default, this
simply makes it possible to use the samples on Vulkan with a one-line
change, which is useful for testing purposes.

This change also makes it so that the materials used for the samples
include SPIR-V. This makes them fatter but they are merely samples.

I still consider Vulkan on Android to be experimental, there are some
features that need to be implemented.
2019-01-15 23:00:18 +05:30
Romain Guy
fac084dfdf Update Markdeep to latest version (2018/12) 2019-01-14 15:53:14 -08:00
Romain Guy
f8ebc047e0 Fix the build 2019-01-14 15:31:17 -08:00
Romain Guy
00f6fa24f7 Code cleanup 2019-01-14 14:57:23 -08:00
Romain Guy
0394aeb23b Add specular anti-aliasing properties to materials (#697)
* Add specular anti-aliasing properties to materials

curvatureToRoughness
limitOverInterpolation

These techiques were supposed to be enabled by default on
desktop but it turns out they were broken. They must now
be enabled manually on each material instead (and work on
mobile).

* Update docs/Materials.md.html
2019-01-14 12:25:51 -08:00