Possible issue with alpha generation for certain shapes

Aperta
#337 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp

Direzione di ricerca

Start by reproducing the reported artifacts with the attached KTX files and the stated basisu.exe command using UASTC, mipmap generation, and sRGB mip filtering. Then trace mip generation and transcoding to BC7 to determine where the alpha artifacts arise. Done means identifying the cause and confirming a change removes the visible artifacts across the supplied examples; the issue names no source files or tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi, I've been using basis to compress ability icons in my game and have noticed that certain geometric patterns cause really obvious square/angular artifacts in the resulting texture, at least when transcoded to BC7. The artifacts seem to mostly show up in generated mip levels and not in the base full-resolution level, which makes me think it could potentially be some sort of downscaling bug or otherwise indicate a problem in the encoder instead of just being a normal artifact.

Including a couple example images (showing the BC7 mips' channels with levels adjusted to make it obvious) and then I will attach the associated ktx files. They're all generated using the basisu.exe compressor with -uastc -ktx2 -mipmap -mip_srgb -mip_clamp -q 254 -comp_level 3 -uastc_rdo_l 0.6 settings. To my eye it looks like the problem is that the RGB channels have rectangular blocks of solid color around the colored shapes, and the hard transition between blocks is causing visible error in the alpha channel when scaled down since the hard transitions are no longer at block boundaries. I'm not sure if you could realistically fix this but it seems likely to affect real-world textures in a way that could be noticeable - for me, I'm generating outlines/drop shadows for these images which amplifies the visibility of the artifacts significantly. I may just find a way to clean them up with biases in the shader. Maybe the way downscaling works could be adjusted so that it will avoid preserving these blocks during the downscale and instead generate new natural block boundaries to avoid the artifacts?

image
image
isse-initiative-buff-party

image
image
isse-initiative-tether

I can also just store these icons as lower resolution RGBA at runtime, so this isn't a huge problem for me, but I figured I'd flag it since it seems to occur for many images instead of just one.

KTX files are in this ZIP: textures.zip

Lingua principale
C++
Stelle
3.1k
Fork
347
Merge medio
4g 3h
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di BinomialLLC/basis_universal

Tutte le issue di BinomialLLC/basis_universal

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.