Automated reprojection-based pixel shader optimization

Pitchaya Sitthi-amorn, Jason Lawrence, Lei Yang, Pedro V. Sander, Diego Nehab, Jiahe Xi
2008 ACM SIGGRAPH Asia 2008 papers on - SIGGRAPH Asia '08  
10% 5% 0% Figure 1 : Several optimization results produced with our system. Each image compares (top) an input pixel shader to (bottom) a version modified to cache and reuse some partial shading computations over consecutive frames. Our system automatically selects the intermediate values to be reused and the rate at which cached entries are refreshed so as to maximize performance improvement while minimizing (inset) the visual error injected into the final shading. Abstract We present a
more » ... We present a framework and supporting algorithms to automate the use of data reprojection as a general tool for optimizing procedural shaders. Although the general strategy of caching and reusing expensive intermediate shading calculations across consecutive frames has previously been shown to provide an effective trade-off between speed and accuracy, the critical choices of what to reuse and at what rate to explicitly refresh cached entries have always been left to a designer. The fact that these decisions require a deep understanding of a procedure's semantic structure makes it challenging to select optimal candidates among possibly hundreds of alternatives. Our automated approach relies on parametric models of the way possible caching decisions affect the shader's performance and visual fidelity. These models are trained using a sample rendering session and drive an interactive profiler in which the user can explore the error/performance trade-offs associated with incorporating temporal reprojection. We evaluate the proposed models and selection algorithm with a prototype system used to optimize several complex shaders; in each case we observed a significant performance improvement. We also compare our approach to current alternatives.
doi:10.1145/1457515.1409080 fatcat:6dtzfakf6zd7hlkhjplyuchis4