Commit Graph
1455 Commits
Author SHA1 Message Date
Mathias Agopian 8cb38344ae remove float3 specialization 2019-06-12 18:31:24 -07:00
Mathias Agopian d90d30d10b Fix #1270 Inconsistent setParameter behavior for arrays
Arrays in unform buffers are stored in std140, i.e. they have an
alignment of float4. This wasn't taken into account when setting
arrays (other than mat3)
2019-06-12 18:31:24 -07:00
Philip Rideout 709c5884ea geometry: tweak provided tangents to enforce orthonormality.
Fixes #1291.
2019-06-12 16:44:18 -07:00
Ben Doherty 5795bef02a Split runStaticCodeAnalysis into separate methods (#1287) 2019-06-12 13:42:18 -07:00
Philip Rideout 1f72b3ac24 gltfio: improve robustness for missing attributes.
The bistro model has some UV-free primitives associated with textured
materials. This caused Filament to emit warnings like:

[entity=445, primitive @ 0] missing required attributes (0xb), declared=0x3

We now catch these in gltfio, which enables a friendlier warning so that
the artist can go make a fix:

Missing UV0 data in Bistro_Research_Exterior_Paris_Building_01_paris_building_01_bottom_4669
2019-06-12 11:22:18 -07:00
Philip Rideout 0949e0a6f3 gltfio: fix bad color in ubershader mode. 2019-06-12 11:22:18 -07:00
Philip Rideout 1139209551 Add JNI bindings for RenderTarget.
New Kotlin sample app is forthcoming.
2019-06-12 10:18:30 -07:00
Philip Rideout 9c4fecb5c6 RenderTarget API now has per-attachment config, etc. 2019-06-11 15:56:24 -07:00
Philip Rideout 8142ffdfb7 Add bloom demo and release notes for #119. 2019-06-11 15:56:24 -07:00
Philip Rideout 961ad36443 Add View::setRenderTarget() for #119. 2019-06-11 15:56:24 -07:00
Philip Rideout 11309a8cf2 Introduce RenderTarget API for #119. 2019-06-11 15:56:24 -07:00
Romain Guy 7fadc438ec Add Filmic ALU tone mapping operator (#1286)
This change also cleans up tone mapping and transfer functions by
getting rid of unused code paths
2019-06-11 12:15:44 -07:00
Romain Guy 7388aeff55 Add Filmic ALU tone mapping operator (#1285) 2019-06-11 11:20:01 -07:00
Mathias Agopian c886d5bcfd rename mirrorFrame() to copyFrame()
"mirror" was misleading, like it would apply a symmetry to the frame.
mirrorFrame() is just a blit from a swapchain to another, so it's a
copy.

The Java language API is kept for compatibility.
2019-06-10 23:45:38 -07:00
Mathias Agopian 58187f5c2c better command queue flushing
Instead of flushing the driver and command queue in RenderPass, we now
do that in the framegraph.

We flush the command queue after each pass -- which reduces memory
pressure on the command queue and improves parallel execution
with the backend thread. We flush the driver only after the last
pass -- maybe we could improve this in the future as the framegraph
gain more knowledge about what's going on.
2019-06-10 23:43:45 -07:00
Ben Doherty 6129930fb0 Show missing required attribute warning in release builds (#1278) 2019-06-10 21:48:52 -07:00
Romain Guy 505bb391c6 Remove file that shouldn't have been checked in 2019-06-10 18:13:55 -07:00
Mathias Agopian 3483eed412 address PR comments.
Typo, comments, unneeded code.
2019-06-10 15:45:32 -07:00
Mathias Agopian aee938b51e Added resolution quality setting for SSAO 2019-06-10 15:45:32 -07:00
Mathias Agopian ba95e522c4 Added SAO "reference" mode for debugging & comments
Reference mode allows to set an arbitrary
number of samples, which are computed in the 
shader.
2019-06-10 15:45:32 -07:00
Mathias Agopian 4c4303eacf Don't use derivative for computing normals
derivative-based normals are essentially
half-resolution, which creates artifacts around
geometry edges.
2019-06-10 15:45:32 -07:00
Mathias Agopian 6a7b1e8cb0 Tweak blur pass trying to improve perfs 2019-06-10 15:45:32 -07:00
Mathias Agopian 62cab7710c Add blur pass to SSAO 2019-06-10 15:45:32 -07:00
Mathias Agopian 96d34349ec encapsulate material data for postprocessing 2019-06-10 15:45:32 -07:00
Mathias Agopian e4c6dcf3bc more efficient depth mipmaping
We simply pick one of the 4 depth texel based on its screen
space offset. Literature showed it doesn't impact AO
significantly.
2019-06-10 15:45:32 -07:00
Romain Guy 0f23633809 Fix warning in OpenGLDriver in release builds 2019-06-10 14:37:19 -07:00
Jeff McGlynn 53adfedc83 Fix msan use-of-uninitialized-value in destroyVertexBuffer (#1277)
GLVertexBuffer.gl.buffers is a std::array which is not
default-initialized, and createVertexBuffer only initializes the first
bufferCount fields of the array.

When destructing, destroyVertexBuffer iterated over all buffers to unset
bindings, but it was erroneously iterating over the entire array instead
of the initialized values.  Update the loop to only iterate over known
initialized values.
2019-06-10 13:38:00 -07:00
Romain Guy 2f736bee19 Update README.md 2019-06-09 21:43:59 -07:00
Ben Doherty ae37ace15b Refactor MaterialBuilder, remove code duplication (#1269) 2019-06-09 18:58:35 -07:00
Romain Guy 1aed2379b9 Use a 32 bit index buffer when necessary (#1273)
Fixes #1272
2019-06-08 17:44:49 -07:00
Philip Rideout f93046308c gltf_baker: improve error handling throughout. 2019-06-05 15:25:47 -07:00
Philip Rideout 1d514e6bf6 gltf_baker: allow re-baking after tweaking options. 2019-06-05 15:25:47 -07:00
Ben Doherty 62e51649fa Refactor MaterialBuilder chunks, findProperties (#1254) 2019-06-05 15:08:00 -07:00
Mathias Agopian edb1beac3d give internet permission to ibl sample
this allows us to use snapdragon profiler
2019-06-05 14:34:58 -07:00
Romain Guy f441e4ec4e Switch desktop to interleaved RGB noise (#1263)
This eliminates the flicker caused by triangle noise based dithering
when FXAA is turned on. This will require further investigation to
see if we can use triangle noise with FXAA without such artifacts.
2019-06-05 10:45:04 -07:00
Philip Rideout 70d569029b gltf_baker: allow adjustment to seed iterations. 2019-06-05 10:11:23 -07:00
Ben Doherty 018d6461f5 Update README with CoreVideo flag (#1266) 2019-06-04 21:15:42 -07:00
Romain Guy 413ce37681 Code formatting cleanup (#1264) 2019-06-04 21:11:00 -07:00
Romain Guy 9d31b7c008 Formatting of shaders 2019-06-04 16:23:20 -07:00
Philip Rideout fb004a1990 AssetPipeline: fix crash with meshes that already have TEXCOORD_4.
Fixes #1256.
2019-06-04 15:48:54 -07:00
Philip Rideout 0262a38c7e gltf_baker: fix radio button numbering 2019-06-04 15:48:54 -07:00
Philip Rideout d3f784d4f9 gltf_baker: add vertex normals visualization 2019-06-04 14:36:03 -07:00
Philip Rideout 475cd80faf gltfio: consolidate buffer slots.
Instead of using the actual glTF attribute indices, we now pack them
so that unused indices do not take up any VertexBuffer slots.

Fixes #1256.
2019-06-04 14:35:51 -07:00
Philip Rideout 37ff2d903f Additional validation in VertexBuffer::Builder::build.
If a client asks for more than 8 buffers in a VertexBuffer, they will
either crash (release) or hit an assert in OpenGLDriver (debug). It's
better to catch this earlier.

This was noticed while investigating #1256.
2019-06-04 13:23:07 -07:00
Philip Rideout a900851abc gltfio: add optional diagnostic shading. 2019-06-03 17:30:56 -07:00
Romain Guy 3ae91957be Reorder shader 2019-06-03 17:24:00 -07:00
Philip Rideout be11944f99 gltf_baker: AssetPipeline now has an options struct. 2019-06-03 13:03:14 -07:00
Philip Rideout f3a70d82cd gltf_baker: make denoise optional. 2019-06-03 13:03:14 -07:00
Philip Rideout 61423f6900 gltf_baker: dilate charts for bent normals. 2019-06-03 13:03:14 -07:00
Philip Rideout 29d2f51fca gltf_baker: make chart dilation optional. 2019-06-03 13:03:14 -07:00