Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision aaa552a4b9cbf9dccb71450f47b268e0ed6370e2 authored by Artem Kharytoniuk on 11 April 2020, 18:46:33 UTC, committed by Matt Pharr on 26 June 2020, 22:19:21 UTC
Fix trilinear filtering
A texture footprint with 'width' characteristic size corresponds to texture
sampling rate with 1 sample per screen pixel. In order to satisfy the Nyquist
limit we need a filter of size '2*width' - and that's what we have in the original
code. This computation does not take into account though, that after computing
lod and selecting mip levels, we apply bilinear filtering to sample each mip.
This effectively increases filter size to '4*width' which results in too blurry images.

There could be at least two solutions here: the first one is to use '2*width' filter size
and then use point sampling when working with separate mip levels. Another solution
proposed here is to select the mip levels based on the 'width' filter size and then rely
on bilinear filtering to get correct result.

I didn't check this but the second method could provide better results because the last step
when we apply bilinear filtering takes into account specific use case and in the case of
point sampling the final result is baked into the mip level, so we don't have an opportunity
to select proper position between texels as we do with bilinear filtering.

The proposed solution also matched HW filtering results, for example, in this
project https://github.com/kennyalive/vulkan-raytracing, the RTX raytracing code
computes texture lod using just 'width' and then applies bilinear filter. The result
closely matches rasterization version. Color encoding of lod levels used in that demo
allows to visualize differences in lod selection. By modifying the code to use '2*width' it
can be shown that is produces wrong result.
1 parent 9629f11
  • Files
  • Changes
  • 75b2527
  • /
History
Cook and download a directory from the Software Heritage Vault

You have requested the cooking of the directory with identifier swh:1:dir:75b2527db208161c9b01f44392006ba955dcc71d into a standard tar.gz archive.

Are you sure you want to continue ?

Download a directory from the Software Heritage Vault

You have requested the download of the directory with identifier swh:1:dir:75b2527db208161c9b01f44392006ba955dcc71d as a standard tar.gz archive.

Are you sure you want to continue ?

Cook and download a revision from the Software Heritage Vault

You have requested the cooking of the history heading to revision with identifier swh:1:rev:aaa552a4b9cbf9dccb71450f47b268e0ed6370e2 into a bare git archive.

Are you sure you want to continue ?

Download a revision from the Software Heritage Vault

You have requested the download of the history heading to revision with identifier swh:1:rev:aaa552a4b9cbf9dccb71450f47b268e0ed6370e2 as a bare git archive.

Are you sure you want to continue ?

Invalid Email !

The provided email is not well-formed.

Download link has expired

The requested archive is no longer available for download from the Software Heritage Vault.

Do you want to cook it again ?

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
revision badge
swh:1:rev:aaa552a4b9cbf9dccb71450f47b268e0ed6370e2
directory badge Iframe embedding
swh:1:dir:75b2527db208161c9b01f44392006ba955dcc71d
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
FileModeSize
cmake
exporters
scenes
src
.gitignore -rw-r--r--47 bytes
.gitmodules -rw-r--r--369 bytes
.travis.yml -rw-r--r--827 bytes
CMakeLists.txt -rw-r--r--15.9 KB
Dockerfile -rw-r--r--340 bytes
LICENSE.txt -rw-r--r--1.3 KB
README.md -rw-r--r--6.0 KB
appveyor.yml -rw-r--r--931 bytes

The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

README.md

swh spinner

Loading README.md ...

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API