This fixes the validation error that occurs when rendering to one
miplevel while sampling from another. It might even be faster since
fewer layout transitions are required.
Closes#2159
There was two issues:
1) Fence::wait would return prematurely when the the timeout was
set to WAIT_FOREVER.
2) (At least) when running from the command line, events were not
read from the main queue. Instead we have to use NSRunLoop instead
of NSApplication APIs.
* Add ground shadow option to gltf_viewer
The shadow is always positioned at the bottom of the loaded object's
bounding box to ground it perfectly.
* Remove unused include
The ultimate goal is to get rid of the concept of render targets in
the framegraph, and this is the first step. Here RenderTarget doesn't
store the discard flags anymore. These flags are now calculated
per-resource, per-pass.
A side effect of this change is that the discard flags are now slightly
better, as they don't contain attachments that don't exist.
i.e. we won't see the STENCIL flag set for instance.
- this simply changes the createRenderTarget() API to take an
'MRT' structure for the color attachment. The MRT structure is
just a wrapper around an array of four TargetBufferInfo.
- in this PR only implemented for OpenGL
- the tuple<> where we store the parameters should only remove the
reference, but not decay, so that arrays could theoretically
be stored (more on this below).
- use std::forward<> instead of std::move<> in Command's ctor, this is
more appropriate, we just want to forward the arguments unchanged.
- add std::move() to all parameters on the command stream stub, it is
appropriate here, because we receive parameters by value or r-value
references.
All this was an attempt to support C-style arrays as parameters, but
it doesn't work because they are decay'ed to pointers when they
appear as parameters.
-DFILAMENT_SKIP_SAMPLES=ON with CMake
-Pfilament_skip_samples with gradle
This change also renames CMake options specific to Filament
to avoid clashes with subprojects.
- minor uniform optimizations (saves ~0.1ms)
- fix some missing highp precision qualifers
- make it easier to tweak the blur filter
- make sure samples's radius goes from 0 to 1
- update comments
After the native async functionality landed, there was no way for web
clients to be notified that the decoding has finished. This PR changes
the existing `onDone` callback so that it gets called after all textures
have been decoded. (Previously it was called after downloading rather
than decoding.)
This has the side effect of simplifying the API because clients no
longer need to call a finalize function.
During the SSAO pass, we pack the decoded depth to the GB channels of
the AO texture, which reduces our bandwidth requirements during the
blurring pass, as well as some ALU usage.
It puts SSAO at about 2ms on pixel4/1080p.
Currently it only selects how many samples are used.
Low,medium,high and ultra respectively map to 7,11,16 and 32 samples.
The default is "low", which is sufficient for most mobile applications.
This is achieved by computing a small 2x2 box blur in the AO pass
taking advantage of quad shading, which allows to halve the size
of the bilateral blur kernel.
Reducing the size of the blur kernel has a side effect to kick Adreno
gpu into direct mode, which apparently is much faster here.
Overall we go from 3.4ms to 2.4ms on Pixel4.
The quality is impacted, but not severely. This probably assumes
GPU that have working derivatives.