Clean up depth and stencil buffers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- cpp
- Ambito
- computer-graphics, performance
Direzione di ricerca
Inizia in gropengldraw.cpp nei siti di creazione citati intorno alle righe 165-181, 274-315 e 533-559, quindi traccia gli usi elencati di depth e stencil attraverso i percorsi di rendering e shader. Scegli e convalida una strategia di pulizia, rimuovi solo i buffer ridondanti e conferma che il rendering, le letture di depth e le operazioni di stencil continuino a funzionare senza lo storage sprecato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
FSO keeps a whole bunch of partially redundant or unused render buffers, which should be tidied up to not waste storage and bandwidth.
Notably we have:
| Type | Storage Format | Attachment Type | Usage | Created in |
|---|---|---|---|---|
| Position Texture | 16-bit float, compressed z | Color Attachment (G-Buffer) | MSAA, deferred shading, soft particles | gropengldraw.cpp, L165-181 |
| Depth Component Texture | 24-bit implementation defined | Depth Attachment | Depth testing, (volumetric) nebula depth fogging, post-proc depth, lightshafts, decals, distortions | gropengldraw.cpp, L295-310 |
| Cockpit Depth Component Texture | 24-bit implementation defined | Depth Attachment | Depth testing in cockpit pass | gropengldraw.cpp, L274-292 |
| Stencil Buffer | 24-bit implementation defined (depth) + 8-bit implementation defined (stencil) | non-attached Renderbuffer | likely none (possibly some stencil purpose, but I'd imagine it should be attached to that then) | gropengldraw.cpp, L313-315 |
| Back Depth Component Texture | 24-bit implementation defined | Depth Attachment | likely none, can serve as depth testing in immediate rendering if back stencil buffer is disabled | gropengldraw.cpp, L533-550 |
| Back Stencil Buffer | 24-bit implementation defined (depth) + 8-bit implementation defined (stencil) | Depth-Stencil attached Renderbuffer | Depth testing in immediate rendering (i.e. techroom) and stencil operations | gropengldraw.cpp, L556-559 |
That's 6 depth buffers, 2 of which likely do nothing at all, and with usages all over the place when we likely should really be using either the position texture or the depth component texture for everything.
I suppose there's three different strategies to solving this:
- Remove all depth-attachment-based buffers, and use the renderbuffers instead, and create an additional renderbuffer for the cockpit pass. This implies changing the shader uses of the depth texture to the position texture, since you cannot read from renderbuffers from shaders. Likely the most performant option.
- Remove all renderbuffer-based buffers. This requires adding stencil bits to the depth textures and attaching them. That in turn likely means we'll need to either change the reads from the depth texture to only pull from the depth bits, or use the position texture instead.
- Keep the current setup, and change the renderbuffers to only store 8-bit stencil data and no depth data. And also properly attach the stencil buffer for the main scene. By far the least invasive change.
- Lingua principale
- C++
- Stelle
- 488
- Fork
- 184
- Merge medio
- 2g 9h
- PR unite (30g)
- 39
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di scp-fs2open/fs2open.github.com
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
scp-fs2open/fs2open.github.com#7918 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
scp-fs2open/fs2open.github.com#7917 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
scp-fs2open/fs2open.github.com#7916 ·
I maintainer di solito rispondono entro 1 giorno
-
P2: A timed rotation maneuver does nothing on a ship that had an earlier timed lateral maneuverForse già presa @vovosta l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
scp-fs2open/fs2open.github.com#7914 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
scp-fs2open/fs2open.github.com#7901 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di scp-fs2open/fs2open.github.com
Issue simili
-
extended_stabilizer: `std::pow(2, p/2.)` in `scalar_t::to_complex()` takes ~40% of runtime on LinuxForse già presa @mehmetniyazikayi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Qiskit/qiskit-aer#2502 ·
I maintainer di solito rispondono entro 1 giorno
-
Test failure on FreeBSD: #26 unexpected system_clock sourceForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertalow priority rt_lib tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
RobLoach/raylib-cpp#440 · 2 commenti ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno