Update eval functions to deal with multi-output shaders

Aperta
#303 0 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
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Start by locating the existing eval functions, vector sample function, and DEFINE_MAP_SHADER macro mentioned in the issue, then trace how they evaluate shaders and handle output buffers. Check how SceneClass exposes shader output counts and offsets. Done means both eval paths select multi-output sampling when the shader has multiple outputs and read the bound output at its offset, with a buffer-accepting vector sample function and a multi-output map shader macro.

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

Descrizione

For the existing eval functions to work with multi-output shaders the eval functions need to recognize that it is a multi-output shader, pass a buffer which is large enough to receive all of the outputs, and pull the bound output from the appropriate offset. To determine if it is an multi-output shader you'll do a getShaderOutputCount() (or equivalent) on the SceneClass to see if it is more than 1. If it is more than 1 then the multi-output version of the sample function should be used and then the offset of the bound output can be retrieved using getShaderOutputOffset (or equivalent) on the SceneClass.

The vector sample function needs a version which passes a buffer as an argument rather than return the value and there needs to be a modified version of the DEFINE_MAP_SHADER macro which can be used for these multi-output shaders. Maybe this could be called DEFINE_MAP_SHADER_MULTIOUTPUT. As with the non-vector eval function the decision of which function to use depends on whether the shader being evaluated is multi-output.

Lingua principale
CMake
Stelle
4.7k
Fork
321
Merge medio
13m
PR unite (30g)
3

Preparare l'ambiente

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 OpenMoonRay/openmoonray

Tutte le issue di OpenMoonRay/openmoonray

Issue simili

Altre issue su Computer Graphics

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.