Commit Graph
934 Commits
Author SHA1 Message Date
Mathias Agopian 28c8f6818e glGenerateMipmap honors base/max level sceneform-1.7pr6 2019-02-15 17:12:56 -08:00
Mathias Agopian 8f42e1a812 fix linux debug build
It looks like out static libc++abi that we use on linux needs
pthread, even if the exe doesn't use it. 
Adding libutils to this test fixes the build on my local linux machine.

The real fix is probably something else, bug I don't quite
understand these shenanigans.
2019-02-15 16:47:28 -08:00
Mathias Agopian 803229bcdc fix another out-of-bounds access 2019-02-15 16:39:48 -08:00
Mathias Agopian c64dae95fa set textures max level properly
the texture's max level wasn't set properly when uploading
data for level 0 (it was for other levels).

this would cause uninitialized levels to be accessed by the GPU.
2019-02-15 16:19:22 -08:00
Philip Rideout 630b14d273 DriverAPI: add generateMipmaps and canGenerateMipmaps.
Fixes #808.  See also comments in #749.
2019-02-15 16:16:20 -08:00
Ben Doherty 08a71bf2f0 Install requirements for linking against filameshio (#818) 2019-02-15 12:08:28 -08:00
Ben Doherty 2e917fc8d0 Build all run-time variants on Windows for CI release and continuous (#816) 2019-02-15 12:08:08 -08:00
Philip Rideout 26ce90483a MeshAssimp: fix glTF material hash function.
I noticed this while working on the new lighter weight loader.
2019-02-15 10:32:33 -08:00
Romain Guy 5b7ad2511e Rename specularIrradiance function in shaders 2019-02-15 10:10:55 +00:00
Romain Guy 42acac02c0 Update documentation
Add titles and use energy preservation vs conservation to describe
two different concepts.
2019-02-15 09:26:52 +00:00
Ben Doherty d0247f7867 Fix build errors in Metal driver (#823) 2019-02-14 21:31:05 -08:00
Philip Rideout 529f65d63c Introduce addEntities method to Scene.
This is an efficient method that allows clients to add a slew of
entities to the scene. This is particularly useful for the upcoming
gltfio library, which is agnostic of the Scene and exposes a flat
list of entities.
2019-02-14 20:55:21 -08:00
Philip Rideout 3b373e5d05 Fix nans in math::slerp. 2019-02-14 20:54:56 -08:00
Mathias Agopian 6fbecef857 fix out-of-bound access 2019-02-14 18:10:46 -08:00
Mathias Agopian e98b413eb5 don't default initialize driver::Viewport/RenderPassFlags
instead we initialize them to zero in RenderPassParams.
2019-02-14 18:08:40 -08:00
Mathias Agopian 147e4d2189 Flags must be zero by default 2019-02-14 18:08:40 -08:00
Mathias Agopian 26468d9532 Split RenderPassParams into multiple structs
We split out Viewport and RenderPassFlags.
2019-02-14 18:08:40 -08:00
Mathias Agopian 6bcceefb04 always use the static version of libc++abi
This is make it a lot easier to distributes binaries like cmgen or
matc.
2019-02-14 18:05:54 -08:00
Mathias Agopian 8a850ff908 improve readme for building on linux 2019-02-14 18:05:12 -08:00
Ben Doherty 7099682204 Metal driver implementation (#795) 2019-02-14 16:04:28 -08:00
Ben Doherty c5090ead8e Fix Incomplete framebuffer assert thrown for iOS (#815) 2019-02-14 13:07:59 -08:00
Philip Rideout 2e1acaee71 Fix potential zero stride in populateTangentQuaternions.
Fixes #794
2019-02-14 09:00:12 -08:00
Mathias Agopian a0f8602d02 getResource() now returns a reference instead of pointer 2019-02-13 17:43:28 -08:00
Mathias Agopian e9c37a356e Minor clean-up
- fix swapped lhs/rhs parameter names
- remove unused field 'samples' in RenderTarget
- make cache matching function more readable
2019-02-13 17:43:28 -08:00
Mathias Agopian 7915bee0df Rendertargets now have a viewport 2019-02-13 17:43:28 -08:00
Mathias Agopian ab18e07995 handle better rendertargets with heterogenous attachments
- when possible we resize the attachments 
- we also round to 32 pixels to take avantage of
  pools the driver may have.
- when attachment can't be resized and don't have
  the same size, we do best effort -- i.e. resize
  the ones that we can.
2019-02-13 17:43:28 -08:00
Mathias Agopian f821718171 Improve rendertarget managment
- RTs are now cached and reused
- Their life time is handled more like a normal
  resource.
2019-02-13 17:43:28 -08:00
Mathias Agopian a1f46652d6 major implementation and api rework
- discard flags are computed correctly
- culling works correctly
- rendertargets are better supported
2019-02-13 17:43:28 -08:00
Mathias Agopian ac679e0da4 FrameGraph API change
Resources are now single textures (generally buffers in the future),
but no longer a render target + a set of texture.
Instead, render target need to be declared and are associated to a pass.
2019-02-13 17:43:28 -08:00
Philip Rideout be18155996 Build web docs only when opting in.
See #807.
2019-02-13 10:28:51 -08:00
Philip Rideout 691daeb45d JNI enhancement: allow mutation of non-direct buffers.
The bug was reproduced and the fix was verified by copying the following
code snippet into one of our Android samples:

    val norm = floatArrayOf(1.0f, 0.0f, 0.0f)
    val tang = floatArrayOf(0.0f, 1.0f, 0.0f, 1.0f)
    val expected = floatArrayOf(0.5f, 0.5f, 0.5f, 0.5f)
    val resultBuffer = FloatBuffer.allocate(4)
    val qtc = VertexBuffer.QuatTangentContext()
    qtc.quatCount = 1
    qtc.quatType = VertexBuffer.QuatType.FLOAT4
    qtc.outBuffer = resultBuffer
    qtc.normals = FloatBuffer.wrap(norm)
    qtc.tangents = FloatBuffer.wrap(tang)
    VertexBuffer.populateTangentQuaternions(qtc)
    Log.e("Filament", "${expected[0]} == ${resultBuffer[0]}")

Fixes #695.
2019-02-11 14:50:14 -08:00
Philip Rideout 40fe6628d0 Expose tangent utility to Java / Kotlin.
This also improves the comments and allows 0 for output stride.
2019-02-11 12:50:19 -08:00
Caleb Leak d2f8fa5a36 Fixed printing of wrong file names
In multiple samples when a file didn't exist, it printed the first file as being the offending argument, regardless of which actually was.
2019-02-11 09:04:21 +01:00
Caleb Leak 32287aea7f Fixed README.md giving an invalid Windows command
The `./` and file separator in the executable path prevented the program from running. The other changes are just cleanup for conformity. This is the last of the Windows doc changes as far as I can tell.
2019-02-11 00:51:03 +09:00
François Guthmann 8253006899 Typo correction
Switched arguments in prefilteredDFG_LUT call to align with function definition in the documentation and in the code.
2019-02-08 10:24:15 -08:00
Ben Doherty e5eb29dc92 Add desktop JNI bindings for filamat (#791) 2019-02-08 09:59:35 -08:00
Ben Doherty a2caea7e88 Metal / Vulkan swapchain (#792) 2019-02-08 09:59:05 -08:00
prideout 5ee359cf40 Move math namespace to fix #746. 2019-02-07 09:23:07 -08:00
Ben Doherty 6089be6de6 Add Metal handles (#790) 2019-02-06 16:05:58 -08:00
prideout 72a987057e Move MeshReader into filamesh namespace.
This class will not extend well to glTF so this cordons it off into the
filamesh namespace, which is an already-existing namespace that we use
for the things related to the filamesh file format.

For glTF we might create a new library with its own MeshReader so
this will mitigate confusion.
2019-02-06 12:59:48 -08:00
Ben Doherty 4b0f1e8247 Add Metal state creation logic (#782) 2019-02-06 12:57:19 -08:00
prideout 60d17fff2e Minor Vulkan fixup. 2019-02-06 10:17:13 -08:00
Caleb Leak 846f21ce51 Fix example running a different app than built 2019-02-06 16:16:17 +09:00
Romain Guy 4327612159 Remove unnecessary function parameter
Our visibility terms don't make use of roughness, only of
roughness^2. This change simplifies the shaders, which will
help for specular AA.
2019-02-06 10:14:05 +09:00
Philip Rideout 714b431cf9 Vulkan: use a longer swap chain to avoid stalls.
This is consistent with the Willems demos, the Overvoorde tutorials,
as well as Intel's "API without Secrets" guidance.

Fixes #778
2019-02-05 15:26:32 -08:00
Mathias Agopian 83d9ba91e5 fix a possible crash in the gl backend
we could crash by dereferencing something that's 
not a pointer when blitting to a rendertarget not
backed by a texture (i.e. renderbuffer).

also there was a case where we couldn't disambiguate
between the two cases.
2019-02-05 14:31:25 -08:00
Ben Doherty 7381475321 Compile material during build for iOS sample (#779) 2019-02-04 20:38:41 -08:00
Ben Doherty d127a718ab Add Metal enums (#774) 2019-02-04 11:09:51 -08:00
Ben Doherty a827f4528a Install filamat and dependencies as single static library (#775) 2019-02-04 11:08:45 -08:00
Philip Rideout 9fd69ec7a9 Add skinning demo.
Motivated by #764.
2019-02-02 09:02:32 -08:00