Colors become lighter when transcoding .basis to .ktx

Aperta
#347 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp

Direzione di ricerca

Start by comparing the .basis to .ktx transcoding path with the .basis to .png unpack path; the issue does not name source files or tests. Check how the KTX output records and handles color space, then reproduce with the provided cubemap commands and images. Done means the generated KTX colors match the expected source colors in the reported viewers.

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

Descrizione

Hello, I'm trying to use basisu to bundle and compress the 6 images of a cube map. It does work, however the resulting .ktx file ends up considerably lighter than the source file. I am using filament as my rendering engine which unfortunately does not support ktx2 cubemaps (I'm stuck on just .ktx) and the compressed format must work on mac, webassembly, iOS and Android so my supported compression formats are limited.

Here is how I compress to .basis and then to .ktx

basisu -tex_type cubemap Face_2.jpg Face_0.jpg Face_4.jpg Face_5.jpg Face_1.jpg Face_3.jpg
basisu -unpack -ktx_only -format_only 1 Face_2.basis

It appears to me the problem is in the .basis to .ktx step. I say this because unpacking the .basis file to .png produces the correct colors. I use the following command to unpack to .pngs:
basisu -unpack -no_ktx Face_2.basis

Let me know if you have any suggestions as to what might be wrong. None of the sRGB/linear basisu command line options seem to help. According to filament the final .ktx file is in linear and not sRGB color space. See the below screen shots.

One of the 6 source images:
Face_2

One of the 6 images unpacked from the .basis file to .png with correct colors:
Face_2_unpacked_rgba_PVRTC2_4_RGBA_0000

A screenshot from the mac preview application of the .ktx file with the overly light colors. Filament displays the same overly light colors.
Screenshot

Thanks,
Omri

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.