# alelievr/hdrp-custom-passes architecture

> Architecture diagram of the GitHub repository alelievr/hdrp-custom-passes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alelievr/hdrp-custom-passes
- Repository: https://github.com/alelievr/hdrp-custom-passes

## Overview

##### Project type and purpose
- This is an open‐source Unity “plugin” / library project providing a collection of HDRP custom passes (post‐processing and rendering effects) for Unity 2022.3 + HDRP 14.x.
- It contains C# scripts, Shader Graphs, HLSL shaders, materials, prefabs and sample scenes demonstrating each effect.

##### File structure analysis
- Top‐level:
- Assets/ – all user content: “CustomPasses/” (each effect under its own folder + asmdef), “Scripts/” (helper MonoBehaviours, managers), “Scenes/” (sample scenes per effect), “Materials/”, “Prefabs/”, “Textures and Sprites/”, etc.
- Packages/ – manifest.json (Unity package dependencies)
- ProjectSettings/ – Unity project configuration
- In Assets/CustomPasses: each effect (TIPS, SlightBlur, Selection, SeeThrough, AR, Glitch, etc.) has its own folder containing:
- C# code for the custom pass
- Shaders / shadergraphs or resources used by that effect
- A CustomPasses.asmdef defining the runtime assembly
- Scenes/ holds .unity files that reference volumes and profiles to inject and configure each custom pass at specific HDRP injection points.

##### README insights
- Describes each effect’s features and source code locations.
- Mentions HDRP injection points (before depth prepass, before forward, after postprocess, etc.).
- Demonstrates how some passes require multiple volumes at different injection points.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Engine / Host
    subgraph "Engine / Host"
        Unity["Unity Engine"]:::engine
    end

    %% HDRP Pipeline and Injection Points
    subgraph "HDRP Render Pipeline"
        HDRP["HDRP Pipeline"]:::engine
        BeforeDepth["BeforeDepthPrepass"]:::engine
        BeforeForward["BeforeForward"]:::engine
        AfterPost["AfterPostProcess"]:::engine
    end

    Unity --> HDRP
    HDRP --> BeforeDepth
    HDRP --> BeforeForward
    HDRP --> AfterPost

    %% CustomPasses Plugin
    subgraph "CustomPasses Plugin"
        asm["CustomPasses Assembly"]:::code
        pkg["Package Manifest"]:::code
        subgraph "Effects"
            AR["AR Effect"]:::code
            AB["Anamorphic Blur"]:::code
            Copy["Copy Pass"]:::code
            CDT["CurrentDepthToCustomDepth"]:::code
            FPSF["FPS Foreground"]:::code
            Fur["Fur"]:::code
            Glass["Glass"]:::code
            Glitch["Glitch"]:::code
            Liquid["Liquid"]:::code
            Outline["Outline"]:::code
            RMV["RenderMotionVectors"]:::code
            RNBuffer["RenderWithNormalBuffer"]:::code
            Scroll["ScrollingFormulas"]:::code
            SeeThrough["SeeThrough"]:::code
            Selection["Selection"]:::code
            SlightBlur["SlightBlur"]:::code
            TIPS["TIPS"]:::code
            UIBlur["UI Blur"]:::code
            VRMask["VR Mask"]:::code
            VideoNoTAA["Video Playback Without TAA"]:::code
            Wetness["Wetness"]:::code
        end
    end

    BeforeDepth --> asm
    BeforeForward --> asm
    AfterPost --> asm
    pkg --> asm

    %% Scripts & Managers
    subgraph "Scripts & Managers"
        AppMgr["ApplicationManager.cs"]:::code
        PanelMgr["PanelManager.cs"]:::code
        NextBtn["NextButton.cs"]:::code
        ProUtil["ProbuilderUtils.cs"]:::code
    end

    %% Scenes & Configuration
    subgraph "Scenes & Volumes"
        Scenes["Sample Scenes (.unity)"]:::config
        Volumes["Volume Profiles (ScriptableObjects)"]:::config
    end

    Scenes --> Volumes
    Volumes --> asm

    %% Assets
    subgraph "Assets"
        Shaders["Shaders & ShaderGraphs"]:::assets
        Materials["Materials & Prefabs"]:::assets
        Textures["RenderTextures & Textures"]:::assets
        Screen["RenderTargets/Screen"]:::assets
    end

    asm -->|executes| Shaders
    asm -->|uses| Materials
    asm -->|writes to| Screen
    Textures --> Shaders

    %% Click Events
    click asm "https://github.com/alelievr/hdrp-custom-passes/blob/master/Assets/CustomPasses/CustomPasses.asmdef"
    click pkg "https://github.com/alelievr/hdrp-custom-passes/blob/master/Assets/CustomPasses/package.json"
    click AR "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/AR"
    click AB "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/AnamorphicBlur"
    click Copy "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/CopyPass"
    click CDT "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/CurrentDepthToCustomDepth"
    click FPSF "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/FPS Foreground"
    click Fur "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/Fur"
    click Glass "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/Glass"
    click Glitch "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/Glitch"
    click Liquid "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/Liquid"
    click Outline "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/Outline"
    click RMV "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/RenderMotionVectors"
    click RNBuffer "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/RenderWithNormalBuffer"
    click Scroll "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/ScrollingFormulas"
    click SeeThrough "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/SeeThrough"
    click Selection "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/Selection"
    click SlightBlur "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/SlightBlur"
    click TIPS "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/TIPS"
    click UIBlur "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/UI_Blur"
    click VRMask "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/VR_Mask"
    click VideoNoTAA "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/Video Playback Without TAA"
    click Wetness "https://github.com/alelievr/hdrp-custom-passes/tree/master/Assets/CustomPasses/Wetness"
    click AppMgr "https://github.com/alelievr/hdrp-custom-passes/blob/master/Assets/Scripts/ApplicationManager.cs"
    click PanelMgr "https://github.com/alelievr/hdrp-custom-passes/blob/master/Assets/Scripts/PanelManager.cs"
    click NextBtn "https://github.com/alelievr/hdrp-custom-passes/blob/master/Assets/Scripts/NextButton.cs"
    click ProUtil "https://github.com/alelievr/hdrp-custom-passes/blob/master/Assets/Scripts/Editor/ProbuilderUtils.cs"

    %% Styles
    classDef engine fill:#D0E6FF,stroke:#2B6CB0,color:#2B6CB0;
    classDef code fill:#E6FFFA,stroke:#2C7A7B,color:#2C7A7B;
    classDef assets fill:#F3E8FF,stroke:#6B46C1,color:#6B46C1;
    classDef config fill:#FFF5E6,stroke:#DD6B20,color:#DD6B20;
```
