This is 466 KB insted of the usual 850 KB. It assumes that users do not
need spec-gloss, non-lit, or a special transparency mode.
(uncompressed SO size on arm64)
We can add a new maven project for this next week.
This doesn't affect quality significantly, but saves 30% of gpu time
on the upsampling, overall it's about 0.1 ms. This brings The bloom
effect below 2ms on Pixel4.
We untonemap/tonemap the first level of blur to reduce the very high
frequencies due to HDR highlights in the image, this produce a softer
image at higher roughness. This can programmatically be turned off,
but that setting is not exposed.
The very first downsample stage costs us a lot because it reads from
a full-res texture. We mitigate this by always doing a blit to
1/4 res. Blits are quite a bit faster, this saves about 1ms on
Pixel4.
math/mathwfd.h forward declares all {mat|vec}{2|3|4}<> classes,
which allows us to remove their respective #include in a lot of
our public headers.
Our math headers are full of templates, so this should help build times
a bit.
Also we want to keep the public headers as minimalist as possible.
To trigger an exception users could either shrink the window or enlarge
the sidebar. Constraining both of these is somewhat tricky so let's
just clamp the viewport width at a low level.
There was actually no need to give special treatment to leading drive
designators since they effectively form the first path segment anyway.
To help prevent regressions, I added a few unit tests in a previous CL.
The motivation for the CL is to remove a dependency on `locale.cpp`,
which can result in shorter build times and reduced binary sizes.
For Android and wasm we do not use the filesystem and therefore do not
need `utils::Path`.
```
libgltfio-jni.so BEFORE 1.9 MB (693 KB gzipped)
libgltfio-jni.so AFTER 1.4 MB (542 KB gzipped)
```
Threshold can be either on or off, and only thresholds at 1.0 when
activated (in pre-exposed mode).
This allows to use very high strengths values for the bloom without
softening the rest of the image, and is useful for artistic considerations.
This is a temporary (hopefully) hack to make the skybox sun look
better when bloom is enabled (this doesn't affect how the "sun" lights
objects, only how it looks in the skybox).
This scale factor was adjusted empirically.
Note that libgeometry is already included in `filament-android`, this
simply exposes more of its existing functionality.
The Java version of SurfaceOrientation is similar to the JavaScript
version because we are bundling it into the main Filament package, even
though it is a separate library in C++. This is much simpler than
creating a brand new Java package.
New Android sample that tests this is forthcoming.
Fixes#1729.
because the intermediate buffer could have non-square pixels, blurring
the buffer would result in an anamorphic blur.
We fix this by properly scaling the buffer before blurring.
Fulfills a request from tirichards@.
This is similar in some ways to dynamic backface culling but simpler
because there is no interaction with double-sided lighting.
For reference, dynamic backface culling was implemented with #1936, #1877, #1641.
This "fixes" the new animated Fox model in the glTF conformance suite.
As per the glTF spec, we now generate per-face normals for the case
where normals are not specified in the model.
Note that true flat shading (i.e. flat interpolation) is not a
requirement in the glTF spec, since some Khronos members advocate for
WebGL 1.0 compatibility.
Fixes#2088.
It turns out that textureLod() only reads the base layer if the sampler
is not set to xxx_MIPMAP_xxx. This prevented the gaussian-blur code
to work properly.
Specifically, the horizontal pass would always use the base layer. Not
only this made the blur unstable, but also hurt performance significantly.
With this change, the untonamap/tonemap is no longer needed and the
results are much more convincing with objects with highlights.
- always take the "blit" path (rather than quad path) when MSAA
and is on. we now rely on the render target to have been resolved
into its texture (implicitly or explicitly). This means in some cases
there will be 2 bliss in a row -- but that's still better than a
blit and a quad. These are unavoidable without using a custom resolve.
- removed creating renderbuffer with the EXT_multisampled_render_to_texture
extension because we didn't support it fully and didn't support
the fallback mode (for desktop or if the extension is not there).
Also this case never happens currently.
- added more assert()
- added a bunch of comments explaining the restrictions of using MSAA
regarding blitting.