- we were not clamping the color grading output to [0,1]
- we were not using a supported input (cpu) pixel format for the
3d LUT in low and medium quality
fast tiles (i.e. where all pixels have the same circle-of-confusion)
are allowed to use bilinear filtering.
this results in better looking DoF in these areas.
Using a ring density of 4 was wrong -- apparently I can't add.
With a density of 8 we can guarantee we don't have gaps between samples
when using mips properly (or at least gaps are consistant and
predictable).
* Add quality option to ColorGrading
Low: 16x16x16 LUT in 10 bit
Medium: 32x32x32 LUT in 10 bit
High: 32x32x32 LUT in 16 bit
Ultra: 64x64x64 LUT in 16 bit
* Move comment
- Use the random offset to calculate the correct intersection radius.
For the center sample, the ring radius is otherwise zero, which means
any sample in the random disk with a CoC radius > 0 would intersect,
and that seems wrong.
- The selected mip was off by one.
We were always picking a mip too high because the CoC are in
high resolution, but our mip-chain is 1/4 res from that.
This improves rendering quality quite a lot.
For testing purposes, sample-gltf-viewer reloads the model when the
user double-taps the screen. This operation was causing a buildup of
blank entities in the Scene, because we were merely destroying the
components, not removing them from the Scene.
This chooses type=THIN, mode=SCREENSPACE, and blending=TRANSPARENT.
Due to sampler overload, we print a friendly error message and enable a
fallback if the user tries to simultaneously enable ubershader mode, the
clearcoat extension, and the transmission extension.
- make sure all downsampling is exactly correct and use proper
uv values to access these textures. This stabilizes the DoF a bit.
- for now only use NEAREST filtering, as bilinear can't be used naively.
- noise is now mandatory, fix noise radius
- add a median pass (performance is not impacted because DoF is faster
due to using NEAREST filtering)
- fix be consistant in how the kernel radius is computed, fix a couple
errors in that area.
- change ring density from 8 to 4 (but starting with 8), so each new
ring is 4 samples larger than the previous. This reduces the number
of samples needed from 25 to 21 on mobile, and 49 to 37 on desktop.
It also makes it conceivable to use 5 rings (57 samples). Quality is
not visibly impacted because the center ring is still 8 samples.
This density, matches the number of samples required for "square"
rings.
- fix scaling issue with diaphragm simulation
- fix typos in background accumulation code -- this fixes a lot of
quality issues.
- improve performance of "fast tiles" during both DoF and combine passes
Overall the effect runs about 0.5ms faster and quality is greatly
improved.
This makes two changes to the Driver API:
1. Adds the beginSubpass() method.
2. Adds subpassMask to RenderPassParams.
Locally I've proven that this PR is sufficient by making a series of
Vulkan changes; sneak peek is available at commit
bfef6914a7d288bbd25926c02ec93d231a8c0d07.
Note that this PR moves the new usage flag to a different texture;
I had placed it on the wrong one.
See also #2780.
The new way is to follow the instructions at the top of
`web/docs/build.py`.
The option in build.sh has been unused for a while. Invoking Python from
CMake was pointless, especially since I don't want to force other
developers to install a specific version of Python etc.
Since postRun can no longer be set from within the extern post JS, we
now use the promise rather than postRun.
This upgrades emsdk to 1.39.19 (see note in #2800).