# blueskydefender/depth3d architecture

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

- Interactive diagram: https://gitdiagram.com/blueskydefender/depth3d
- Repository: https://github.com/blueskydefender/depth3d

## Overview

##### Project type and purpose
- This is an open-source ReShade shader collection (post-process effects) rather than a traditional multi-tier web app or microservice suite.
- Its goal is to package a set of HLSL-style shader files (.fx/.fxh) plus supporting textures, so that users can drop them into ReShade’s “Shaders” folder in any DirectX 11+ game and get advanced depth-based 3D and related effects.

##### File structure
- Top-level folders:
– “Shaders”: primary .fx/.fxh files you’d ship to end users
– “Other Shaders”: extra or legacy shaders not part of the main suite
– “Textures”: lookup tables or other image assets the shaders reference
- Root files:
– README.md (project overview and how-to)
– _config.yml (GitHub Pages site config)
- No code directories like src/tests—this is purely assets and configuration.

##### Extract insights from the README
- Key ﬁlters: SuperDepth3D.fx (depth-map-based stereoscopic rendering) and Overwatch.fxh (an assistant to auto-tune depth parameters per game).
- No in-repo companion apps: the VR viewer is a separate download (deprecated).

##### Main components
a. User environment
– Game (DX11+ executable)
– ReShade injection layer (DLL hook)
b. Asset bundle (this repo when installed)
– Shaders folder → .fx/.fxh HLSL passes
– Other Shaders → auxiliary filters
– Textures → LUTs & supporting maps
c. GPU & pipeline
– Vertex/Pixel Shader stages invoked by ReShade
– Shader outputs: modified RGBA frames
d. Configuration & tuning
– ReShade.ini (user-editable settings, not in repo but implied)
– Depth-map calibration by Overwatch.fxh

##### Relationships and data flows
- Overwatch.fxh reads per-game presets (embedded or user-supplied) to adjust depth constants before SuperDepth3D runs.

##### Architectural patterns & design principles
- Plugin pattern: the shaders are dynamically discovered by ReShade at runtime.
- Separation of concerns:
– Core effects (.fx) vs. utility/includes (.fxh) vs. raw assets (Textures)
– Main vs. legacy/experimental (Shaders vs. Other Shaders)
- Declarative configuration: behavior is driven by shader code and ReShade’s INI, no procedural binaries in the repo.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Environment
    subgraph "User Environment"
        Game["Game (DX11+ Executable)"]:::host
        ReShade["ReShade Injection Layer (DLL Hook)"]:::host
    end

    %% Shaders Bundle
    subgraph "Shaders Bundle" 
        CoreBundle["Core Effects Bundle"]:::dev
        SuperDepth3D["SuperDepth3D.fx"]:::dev
        Overwatch["Overwatch.fxh"]:::dev
        AXAA["AXAA.fxh"]:::dev
    end

    %% Legacy Shaders (optional)
    subgraph "Other Shaders (Legacy/Experimental)" 
        direction TB
        LegacyGroup["Legacy/Experimental Shaders"]:::legacy
        Legacy1["3DToElse.fx"]:::legacy
        Legacy2["Depth_Tool.fx"]:::legacy
        Legacy3["Dimension_Plus.fx"]:::legacy
        Legacy4["Polynomial_Barrel_Distortion_for_HMDs.fx"]:::legacy
        Legacy5["SuperDepth3D_WoWvx.fx"]:::legacy
        Legacy6["VirtualNose.fx"]:::legacy
    end

    %% Textures
    subgraph "Textures (LUTs & Maps)"
        Textures["Textures Folder"]:::dev
    end

    %% Hardware & Display
    subgraph "GPU & Driver"
        GPU["GPU Shader Pipeline"]:::hw
    end
    subgraph "Display"
        Display["Display Output"]:::hw
    end

    %% Documentation
    README["README.md"]:::docs
    Config["_config.yml"]:::docs

    %% Relationships
    Game -->|"captures frame"| ReShade
    ReShade -->|"invokes shaders"| CoreBundle
    CoreBundle --> SuperDepth3D
    CoreBundle --> Overwatch
    CoreBundle --> AXAA
    Overwatch -->|"includes tuning"| SuperDepth3D
    SuperDepth3D -->|"samples textures"| Textures
    SuperDepth3D -->|"executes on"| GPU
    GPU -->|"renders output"| Display

    LegacyGroup --> Legacy1
    LegacyGroup --> Legacy2
    LegacyGroup --> Legacy3
    LegacyGroup --> Legacy4
    LegacyGroup --> Legacy5
    LegacyGroup --> Legacy6

    %% Click Events
    click CoreBundle "https://github.com/blueskydefender/depth3d/tree/master/Shaders/"
    click SuperDepth3D "https://github.com/blueskydefender/depth3d/blob/master/Shaders/SuperDepth3D.fx"
    click Overwatch "https://github.com/blueskydefender/depth3d/blob/master/Shaders/Overwatch.fxh"
    click AXAA "https://github.com/blueskydefender/depth3d/blob/master/Shaders/AXAA.fxh"
    click LegacyGroup "https://github.com/blueskydefender/depth3d/tree/master/Other  Shaders/"
    click Legacy1 "https://github.com/blueskydefender/depth3d/blob/master/Other  Shaders/3DToElse.fx"
    click Legacy2 "https://github.com/blueskydefender/depth3d/blob/master/Other  Shaders/Depth_Tool.fx"
    click Legacy3 "https://github.com/blueskydefender/depth3d/blob/master/Other  Shaders/Dimension_Plus.fx"
    click Legacy4 "https://github.com/blueskydefender/depth3d/blob/master/Other  Shaders/Polynomial_Barrel_Distortion_for_HMDs.fx"
    click Legacy5 "https://github.com/blueskydefender/depth3d/blob/master/Other  Shaders/SuperDepth3D_WoWvx.fx"
    click Legacy6 "https://github.com/blueskydefender/depth3d/blob/master/Other  Shaders/VirtualNose.fx"
    click Textures "https://github.com/blueskydefender/depth3d/tree/master/Textures/"
    click README "https://github.com/blueskydefender/depth3d/blob/master/README.md"
    click Config "https://github.com/blueskydefender/depth3d/blob/master/_config.yml"

    %% Styles
    classDef host fill:#BBDEFB,stroke:#0D47A1;
    classDef dev fill:#C8E6C9,stroke:#2E7D32;
    classDef hw fill:#FFE0B2,stroke:#EF6C00;
    classDef legacy fill:#E0E0E0,stroke:#9E9E9E,stroke-dasharray:5 5;
    classDef docs fill:#F3E5F5,stroke:#6A1B9A;
```
