Three.js: HDR cubemap background banding artifacts

Created on 23 Jun 2020  路  1Comment  路  Source: mrdoob/three.js

The artifacts shown right in current three.js HDR envmap example: https://threejs.org/examples/?q=hdr#webgl_materials_envmaps_hdr
It only appears in HDR envMap, RGBM16 is fine.
image
It's not browser or device specific as I've checked on Chrome, Firefox, Desktop and Android.

Question

Most helpful comment

The cause is this:

hdrCubeMap.magFilter = THREE.LinearFilter;

You will get artifacts applying linear filtering to RGBE-encoded images. You can do this:

hdrCubeMap.magFilter = THREE.NearestFilter;

but that will lead to blocky artifacts.

If it is supported by the browser/hardware, you can use this pattern with linear filtering:

hdrCubeMap = new HDRCubeTextureLoader()
    .setDataType( THREE.FloatType ) // or THREE.HalfFloatType

>All comments

The cause is this:

hdrCubeMap.magFilter = THREE.LinearFilter;

You will get artifacts applying linear filtering to RGBE-encoded images. You can do this:

hdrCubeMap.magFilter = THREE.NearestFilter;

but that will lead to blocky artifacts.

If it is supported by the browser/hardware, you can use this pattern with linear filtering:

hdrCubeMap = new HDRCubeTextureLoader()
    .setDataType( THREE.FloatType ) // or THREE.HalfFloatType
Was this page helpful?
0 / 5 - 0 ratings