* mipgen: Linearized PNG bitmaps (such as normal maps) no longer perform gamma transform on read.
* mipgen: Using "-k normals" argument now works for all file types, not just KTX
* Web: Exposed SurfaceOrientation functions getQuatsHalf4() and getQuatsFloat()
When supported and enabled, resolve MSAA using an HDR aware filter,
which improves anti-aliasing quality.
This is only supported with backends that support multi-sampled
framebuffer-fetch. Currently, only Metal on iOS and GLES.
Update remote ui.
The main issue that gets fixed here are:
- VK_IMAGE_LAYOUT_UNDEFINED cannot be used if the image content is to
be preserved after the transition. Unfortunately, there is more than a
few places in the VK backend where we use VK_IMAGE_LAYOUT_UNDEFINED on
images that are later used as sources.
- accessing an image memory from the host is only supported if the the
layout is PREINITIALIZED or GENERAL. However, images in the staging
pool were transitioned to other layouts and put back into the pool,
later they would be mapped/memcpy'ed into. Instead we now always use
the GENERAL layout and never change it.
- images that where in the pool where transitioned using the miplevel
of the texture we were copying into, however this didn't make sense
because images from the pool don't have mip levels.
As part of these fixes, we also refactor imageLayoutTranstion(),
because there was two copies of this function, one specific to texture
and another one more generic. We now always use the more generic one,
with a new helper for textures.
Note: didn't fix "readPixels" which has at least problem (1), because
it's a tricky implementation, and it requires more toughts.
This is a pixel accurate implementation of picking. Picking queries
can be created on view, and upon completion a user provided callback
is called with the Entity of the renderable at the queried coordinates
in the viewport.
Picking queries typically have 1 or 2 frame of latency and may impact
performance on some drivers.
It is mostly intended for use by editors, or when latency is not a major
concern. This api should not be used for dragging/moving objects, it is
intended for initial picking only.
Picking is implemented in the structure pass.
The depth buffer value is retrieved and the fragment coordinate is
reconstructed and passed to PickingQueryResult. This can be used in
turn to calculate the view and/or world space position.
This should help Filament properly support more glTF assets with
transparency, and should make Filament behave more like other
renderers such as three.js.
The finalizer can't be used to dispose of filament resource, because
it runs on its own thread.
Added a destroy() method to all IBLPrefilter related classes that must
be called once the object is no longer needed.
note: Resources will be freed eventually anyways when the Engine itself is
destroyed.
fixes#4633
A lod bias can be applied to textures when dynamic resolution is
enabled. A proper lod bias is calculated and applied for quality levels
HIGH and ULTRA.
Lod Bias is implemented in glslang, which mean it's ignored when
glslang is not used, which currently happens with OpenGL backends with
optimization turned off (which includes filament LITE). This may be
fixed in the future.
We were decrementing activeJobCount after removing the job from the
queue, which could cause other threads in the pool to preempt us before
the decrement, causing them to spin forever trying to get a non-existant
job, until the decrement actually happened.
Now we always decrement first and fix-up the count if we couldn't get
a job from the queues. The race is inverted, and doesn't cause threads
to spin a long time.
In low-light conditions, peak luminance sensitivity of the eye shifts
toward the blue end of the visible spectrum. This effect called the
Purkinje effect occurs during the transition from photopic (cone-based)
vision to scotopic (rod-based) vision. Because the rods and cones use the
same neural pathways, a color shift is introduced as the rods take over to
improve low-light perception.
This function aims to (somewhat) replicate this color shift and peak
luminance sensitivity increase to more faithfully reproduce scenes in
low-light conditions as they would be perceived by a human observer
(as opposed to an artificial observer such as a camera sensor).
The night adaptation can be controlled using a 0..1 factor for artistic
reasons: `ColorGrading::Builder::nightAdaptation()`.
* Use wide gamut color grading and gamut mapping
This change introduces a new API on ColorGrading to enable or disable gamut mapping at will. This feature is currently off by default and while useful and recommended, it isn't cheap and we need to figure out what we want our defaults to be especially on mobile targets.
Gamut mapping can be combined with luminance scaling to properly control hue skews.
* Small cleanup
* More precise Rec.2020 conversion
- don't use a separate array for "reversedWindingOrder"
it's just one bit of data and we had 7 bits left in the Visibility structure.
- use Culler::result_type instead of hardcoded value everywhere
- other minor cleanups
This used to reside in View and it is now its own class. The reality is
that "per view" UBO is a bit of a misnomer -- currently we indeed have
one per View, but that's not required and in fact, in the future we might
want to have a separate one for shadow maps for instance.
A better name would be "per camera". Currently it is dynamically updated
when rendering the View and shadow maps. In the future this probably need
to be separated.
There was a confusion on utils::bitset<> API, it specifies the number
of words to use, not then number of bits in the set.
VariantList was sized to store 8192 bits instead of 128.
The new default values match almost exactly the filmic tone mapper which
is itself a close approximation of ACES. This result in a slightly more
contrasty and pleasing image out of the box.
Currently there are 8 light channels, both renderables and lights can
be associated to one or several light channel, lighting occurs when
at least one channel is active on both the light and the renderable.
Fixes#4275
We now have an option for evaluating the bent normals from SSAO.
This is used to improve specular AO.
Currently these bent normals are not used for diffuse lighting because
they're "flat" (face normals), which is too distracting.
The bent normal buffer is stored in the SSAO texture, in a separate
layer. This is the first post processing effect that uses 2D array
in order to limit our sampler usage.
This CL also changes how we handle SPECULAR_AO_BENT_NORMALS when
material bent normals are not available: we're now using the "Cones"
algorithm with the regular normal, instead of Lagarde's approximation.
This fixes two bugs that combined in a way that prevented a double-free
error.
The destructor of the impl class for AssetLoader was never called, which
was sort of good, because it should not destroy the material provider.
The asset loader was never meant to have ownership over the provider.