| 421 | } |
| 422 | |
| 423 | devicert::AsyncEvent LocalFrameBuffer::postProcess() |
| 424 | { |
| 425 | // Calculate per-task variance if any samples accumulated into variance |
| 426 | // buffer, skip it if frameVariance overridden in writeTiles() |
| 427 | devicert::AsyncEvent event; |
| 428 | const bool oddFrame = (getSh()->super.frameID & 1) == 1; |
| 429 | if (varianceFrameOp && oddFrame && (frameVariance == float(inf))) |
| 430 | event = varianceFrameOp->process(); |
| 431 | |
| 432 | // Execute user-defined post-processing kernels |
| 433 | for (auto &p : frameOps) |
| 434 | event = p->process(); |
| 435 | |
| 436 | // Run final color conversion if needed |
| 437 | if (colorConversionFrameOp) |
| 438 | event = colorConversionFrameOp->process(); |
| 439 | |
| 440 | // Return asynchronous event |
| 441 | return event; |
| 442 | } |
| 443 | |
| 444 | namespace { |
| 445 | template <typename T> |