Rendering Pipeline Optimization Projects

Members: Rui Wang, Shi Li, Yuzhi Liang, Hujun Bao

Alumni: Xianjin Yang, Yazhen Yuan

Automatic Shader Simplification Using Surface Signal Approximation

Rui Wang, Xianjin Yang, Yazhen Yuan, Wei Chen, Kavita Bala, Hujun Bao,
State Key Lab of CAD&CG, Zhejiang University

ACM Transactions on Graphics (TOG), 33(6), 11 pages, ACM SIGGRAPH ASIA 2014

Abstract:

In this paper, we present a new automatic shader simplification method using surface signal approximation. We regard the entire multi-stage rendering pipeline as a process that generates signals on surfaces, and we formulate the simplification of the fragment shader as a global simplification problem across multi-shader stages. Three new shader simplification rules are proposed to solve the problem. First, the code transformation rule transforms fragment shader code to other shader stages in order to redistribute computations on pixels up to the level of geometry primitives. Second, the surface-wise approximation rule uses high-order polynomial basis functions on surfaces to approximate pixel-wise computations in the fragment shader. These approximations are pre-cached and simplify computations at runtime. Third, the surface subdivision rule tessellates surfaces into smaller patches. It combines with the previous two rules to approximate pixel-wise signals at different levels of tessellations with different computation times and visual errors. To evaluate simplified shaders using these simplification rules, we introduce a new cost model that includes the visual quality, rendering time and memory consumption. With these simplification rules and the cost model, we present an integrated shader simplification algorithm that is capable of automatically generating variants of simplified shaders and selecting a sequence of preferable shaders. Results show that the sequence of selected simplified shaders balance performance, accuracy and memory consumption well.

Download:

Paper
Supplemental Document
Supplemental Video

Simplified and Tessellated Mesh for Realtime High Quality Rendering

Yazhen Yuan, Rui Wang, Jin Huang, Yanming Jia, Hujun Bao
State Key Lab of CAD&CG, Zhejiang University

Computers & Graphics, 54, p135-144, CAD/GRAPHICS 2015.

Abstract:

Many applications require manipulation and visualization of complex and highly detailed models at realtime. In this paper, we present a new mesh process and rendering method for realtime high quality rendering. The basic idea is to send a simplified mesh to hardware pipeline, while use the online tessellation on the GPU to facilitate the rendering of complex geometric details. We formulate it into an inverse tessellation problem that first computes the simplified mesh, and then optimizes the tessellated mesh with geometric details to approximate the original mesh. To solve this problem, we propose a two-stage algorithm. In the first stage, we employ an iterative surface simplification technique, where we take the requirement of hardware tessellation into consideration to obtain an optimal simplified mesh. In the second stage, to better utilize the hardware tessellation, we propose a moving vertex strategy to approximate the tessellated mesh to the original mesh. Results show that our method achieves 2-4 times faster at rendering but still retains high quality geometrical details.

Download:

Paper
Supplemental Video

Runtime Shader Simplification via Instant Search in Reduced Optimization Space

Yazhen Yuan, Rui Wang, Tianlei Hu, Hujun Bao
State Key Lab of CAD&CG, Zhejiang University

Computer Graphics Forum, 34, EGSR 2018.

Abstract:

Traditional automatic shader simplification simplifies shaders in an offline process, which is typically carried out in a contextoblivious manner or with the use of some example contexts, e.g., certain hardware platforms, scenes, and uniform parameters, etc. As a result, these pre-simplified shaders may fail at adapting to runtime changes of the rendering context that were not considered in the simplification process. In this paper, we propose a new automatic shader simplification technique, which explores two key aspects of a runtime simplification framework: the optimization space and the instant search for optimal simplified shaders with runtime context. The proposed technique still requires a preprocess stage to process the original shader. However, instead of directly computing optimal simplified shaders, the proposed preprocess generates a reduced shader optimization space. In particular, two heuristic estimates of the quality and performance of simplified shaders are presented to group similar variants into representative ones, which serve as basic graph nodes of the simplification dependency graph (SDG), a new representation of the optimization space. At the runtime simplification stage, a parallel discrete optimization algorithm is employed to instantly search in the SDG for optimal simplified shaders. New data-driven cost models are proposed to predict the runtime quality and performance of simplified shaders on the basis of data collected during runtime. Results show that the selected simplifications of complex shaders achieve 1.6 to 2.5 times speedup and still retain high rendering quality.

Download:

Paper
Supplemental Video

Tile Pair-Based Adaptive Multi-Rate Stereo Shading

Yazhen Yuan, Rui Wang, Hujun Bao
State Key Lab of CAD&CG, Zhejiang University

Accepted by IEEE Transactions on Visualization and Computer Graphics.

Abstract:

The work proposes a new stereo shading architecture that enables adaptive shading rates and automatic shading reuse among triangles and between two views. The proposed pipeline presents several novel features. First, the present sort-middle/bin shading is extended to tile pair-based shading to rasterize and shade pixels at two views simultaneously. A new rasterization algorithm utilizing epipolar geometry is then proposed to schedule tile pairs and perform rasterization at stereo views efficiently. Second, this work presents an adaptive multi-rate shading framework to compute shading on pixels at different rates. A novel tile-based screen space cache and a new cache reuse shader are proposed to perform such multi-rate shading across triangles and views. The results show that the newly proposed method outperforms the standard sort-middle shading and the state-of-the-art multi-rate shading by achieving considerably lower shading costs and memory bandwidths.

Download:

Paper
Supplemental Document
Supplemental Video