If expecting a bool and receiving anything other than true or false,
this is invalid and should fail. This change triggered a unit test
failure which uncovered several actual problems.
We should take care not to call glVertexAttribPointer when there is
no bound ARRAY_BUFFER (i.e. when its binding is zero).
This fixes the black screen seen with some WebGL samples after
the recent memory leak fix related to the new BufferObject API.
It did improve the look of the blur on far way geometry in some case,
but overall it hurts a lot more.
The case that falls appart is when everything is in the background layer
but there is a large depth difference anyways.
This creates a halo around edges.
Fixes#3221
* BackendTest: add blit cubemap test.
This test is similar to manual mipmap generation for cubemaps and
can uncover issues that are provked by libiblprefilter. It simply
dumps out a PNG that can be manually inspected.
Also, this test does not do makeCurrent / commit and is therefore
similar to renderStandaloneView.
* Update filament/backend/test/test_Blit.cpp
Co-authored-by: Ben Doherty <bendoherty@google.com>
Co-authored-by: Ben Doherty <bendoherty@google.com>
This leak was introduced in the following PR on April 7.
https://github.com/google/filament/pull/3775
The guilty party has been contacted and properly admonished for his
transgression.
This was tested by adding the following code after applyAnimation in
gltf_viewer.cpp
static int nframes = 0;
if (!gpath.empty() && nframes++ > 100) {
static int count = 0;
printf("reloading %d\n", count++);
nframes = 0;
app.resourceLoader->asyncCancelLoad();
app.resourceLoader->evictResourceData();
app.viewer->removeAsset();
app.assetLoader->destroyAsset(app.asset);
loadAsset(gpath, app);
loadResources(gpath, app);
}
- remove areFeedbackLoopsSupported from backend API, since this is only
a problem on WebGL
- binary only include either the regular or webgl version of the bloom
code, never both, which should save some binary size
- bloom pass is now called outside of the colorGrading pass, which is
cleaner and makes it available for other pass, should they need it
(not the case right now).
- always pass ColorGradingConfig to all color grading related methods,
instead of individual parameters
- very minor optimization in bloom shader
- move kernel weight computation to the gpu side as a small cost, in
order to simplify the CPU side and reduce the binary size.
- skip samples with a weight of 0, which is a completely coherent
check.
- fix a typo in move ctor
We chose 8 renderbuffer because it seems to be commonly supported
on mobile gpu and is more than 6 which is needed for generating
cubemaps. 4 was the minimum guaranteed by ES3.0.
The main changes here are:
- TargetBufferFlags is now a uint32_t instead of uint8_t
- The number of render buffer supported by filament and supported by
the hardware can now be different. Applications/users now must
query this value if more than 4 is needed.
- added a backend query (used gl terminology)
This is a redo of a previous attempt. There was an issue in the GL
backend that caused MRT to fail on some devices.