gpgpu - Blending in opengl compute shaders -
since imageatomicadd (which seems real atomic "read-modify-store" function operates on images) available 32bit integers, don't see sensible way accumulate multiple color values different shader invocations in 1 pixel.
the reasonable way can see use 32bit per color (128bit per rgba pixel), add 8bit color values up, hope doesn't overflow , clamp 8bit afterwards. seems wasteful , restrictive (only pure additive blending?)
accumulating in other data structures doesn't solve issue, since shared variables , ssbos seem support atomicadd , on integers.
there 2 reasons make me think missing something: 1. every pathtracer allows concurrent intersection testing (for example shadow rays) has solve issue seems there must solution. 2. kinds of fancy blending can done in fragment shaders, hardware capable of doing this.
is writing pathtracers have 1:1 shader invocation:pixel mapping?
Comments
Post a Comment