Alan Liu
Technical Artist
Rendering Pipelines / Shaders / Tools Development
Artstation: https://www.artstation.com/alanliu0401
GitHub: https://github.com/Matrix150
Unity Scriptable Rendering Pipeline

Example of Sponza scene rendered by SRP
Introduction
A custom Scriptable Render Pipeline implemented in Unity using C# and HLSL.
The pipeline covers the full rendering workflow, including culling, lighting, shadow mapping, and post-processing, with a modular architecture designed for flexibility and extensibility.
Focused on understanding modern rendering pipelines and building production-style rendering systems.
Overview:
This project implements a full custom rendering pipeline using Unity’s Scriptable Render Pipeline (SRP).
It includes core rendering stages such as camera rendering, culling, command buffer execution, lighting, shadow mapping, and post-processing.
The system is designed to provide explicit control over rendering order, data flow, and GPU interaction.
Technical Breakdown
Rendering Pipeline
Implemented the full SRP rendering flow, controlling each stage of rendering explicitly.
The pipeline handles opaque and transparent objects separately to ensure correct rendering order and visual results.
Command buffers are used to manage rendering execution and GPU submission.

Rendering Flow showing in Frame Debugger


Customize rendering order
Lighting System
Implemented a lighting system supporting multiple light types (Directional, Point, Spot).
Light data is extracted from culling results and uploaded to the GPU via command buffers.
Lighting calculations are performed in shaders using a BRDF-based model.


Light Data Setup
Lighting Shader

Light Settings Pannel
BRDF & Global Illumination
Built a physically-based shading model using a microfacet BRDF.
Supports baked global illumination by integrating lightmaps and environment lighting with real-time shading.

BRDF (microfacet model)

Baked Global Illumination

Lighting computation combining material and light data
Shadow Mapping
Implemented shadow mapping for multiple light types.
Supports configurable shadow parameters such as resolution, cascades, and filtering.
Shadow maps are generated per light and integrated into the lighting pipeline.


Shadow rendering
Configurable shadow settings

Visualized generated shadow maps
Shader Library
Developed a modular shader library for reusability and maintainability.
Includes shared material inputs, math utilities, coordinate transformations, and BRDF functions.
Supports both Lit and Unlit shaders.


Lit & Unlit Shader

Shader function library
Material System
Built a parameter-driven material system based on the shader library.
Material properties are bound to shaders and reused across rendering passes.
Supports reusable presets for different rendering scenarios.


Normal Map On/Off


Shadow On/Off
Post Processing
Implemented post-processing effects including color grading and exposure control.
The pipeline generates intermediate textures (color and depth) as inputs for post-processing.
Post-processing is integrated into the rendering pipeline with explicit execution order.

Post Processing Setting


Color Texture On/Off

Example of color grading (Highlight: Red, Shadow: Yellow)
Optimization
GPU Instancing:
Implemented GPU instancing and dynamic batching to improve rendering performance.
Supports rendering 500+ instances of the same mesh in a single draw call.
Frame Debugger confirms reduced draw calls and efficient batching behavior.
-
Reduced draw calls significantly
-
Improved rendering performance
-
Supports per-instance material variation


Example of rendering 500+ instancing using GPU Instancing

GPU Instancing and Batching settings