# jcant0n/shaderlibrary architecture

> Architecture diagram of the GitHub repository jcant0n/shaderlibrary, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jcant0n/shaderlibrary
- Repository: https://github.com/jcant0n/shaderlibrary

## Overview

This repository is an Evergine shader-effects collection with a small sample application for viewing them. A user runs a Windows host, which configures a graphics API and drives the application; initialization loads the LightingTechniques scene. The shader assets cover lighting, reflections, geometry effects, and parallax techniques, with sample materials, textures, and scenes. The graph reflects the README’s documented shader capabilities and the supplied runtime code; shader-to-scene assignments beyond the explicit scene load are not inferred.

Main entry points: [`Shaders/Shaders/MyApplication.cs`](https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders/MyApplication.cs) (Application), [`Shaders/Shaders/MyScene.cs`](https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders/MyScene.cs) (Scene Setup), [`Shaders/Shaders.Windows/Program.cs`](https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders.Windows/Program.cs) (DX11 Host), [`Shaders/Shaders.Windows.DirectX12/Program.cs`](https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders.Windows.DirectX12/Program.cs) (DX12 Host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Sample Runtime"]
  node_app["Application<br/>[MyApplication.cs]"]
  node_scene["Scene Setup<br/>[MyScene.cs]"]
end

subgraph group_hosts["Graphics Hosts"]
  node_host11["DX11 Host<br/>[Program.cs]"]
  node_host12["DX12 Host<br/>[Program.cs]"]
  node_hostgl["OpenGL Host<br/>[Program.cs]"]
  node_hostvk["Vulkan Host<br/>[Program.cs]"]
end

subgraph group_lighting["Lighting Effects"]
  node_blinn["Blinn-Phong"]
  node_brdf["Microfacet BRDF"]
  node_ibl["Image Lighting"]
  node_envlighting["Environment Lighting"]
  node_reflections["Environment Reflections"]
  node_primitives["Shading Primitives"]
end

subgraph group_effects["Surface Effects"]
  node_geometry["Geometry Effects"]
  node_parallax["Parallax Effects"]
  node_fur["Fur Shells"]
  node_toon["Toon Shading"]
  node_translucency["Translucency"]
  node_wrap["Wrap Shading"]
end

subgraph group_content["Sample Content"]
  node_scenes["Example Scenes"]
  node_common["Shared Assets"]
end

node_user(("Viewer"))

node_user -->|"runs"| node_host11
node_user -->|"runs"| node_host12
node_user -->|"runs"| node_hostgl
node_user -->|"runs"| node_hostvk
node_host11 -->|"drives"| node_app
node_host12 -->|"drives"| node_app
node_hostgl -->|"drives"| node_app
node_hostvk -->|"drives"| node_app
node_app -->|"loads"| node_scene
node_app -->|"loads LightingTechniques"| node_scenes
node_scene -->|"registers physics"| node_common

click node_host11 "https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders.Windows/Program.cs"
click node_host12 "https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders.Windows.DirectX12/Program.cs"
click node_hostgl "https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders.Windows.OpenGL/Program.cs"
click node_hostvk "https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders.Windows.Vulkan/Program.cs"
click node_app "https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders/MyApplication.cs"
click node_scene "https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders/MyScene.cs"
click node_scenes "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Scenes"
click node_common "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Common"
click node_blinn "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/Blinn%20Phong"
click node_brdf "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/BRDF"
click node_ibl "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/BRDF%20IBL"
click node_envlighting "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/Environment%20Lighting"
click node_reflections "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading"
click node_primitives "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/Primitives"
click node_geometry "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Geometry"
click node_parallax "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Parallax"
click node_fur "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Geometry/Fur"
click node_toon "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/ToonShading"
click node_translucency "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/Translucency"
click node_wrap "https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/WrapShading"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_scene,node_user toneBlue
class node_host11,node_host12,node_hostgl,node_hostvk toneAmber
class node_blinn,node_brdf,node_ibl,node_envlighting,node_reflections,node_primitives toneMint
class node_geometry,node_parallax,node_fur,node_toon,node_translucency,node_wrap toneRose
class node_scenes,node_common toneIndigo
```

## Components

### Sample Runtime

- [Application](https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders/MyApplication.cs): `Shaders/Shaders/MyApplication.cs`
- [Scene Setup](https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders/MyScene.cs): `Shaders/Shaders/MyScene.cs`

### Graphics Hosts

- [DX11 Host](https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders.Windows/Program.cs): `Shaders/Shaders.Windows/Program.cs`
- [DX12 Host](https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders.Windows.DirectX12/Program.cs): `Shaders/Shaders.Windows.DirectX12/Program.cs`
- [OpenGL Host](https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders.Windows.OpenGL/Program.cs): `Shaders/Shaders.Windows.OpenGL/Program.cs`
- [Vulkan Host](https://github.com/jcant0n/shaderlibrary/blob/main/Shaders/Shaders.Windows.Vulkan/Program.cs): `Shaders/Shaders.Windows.Vulkan/Program.cs`

### Lighting Effects

- [Blinn-Phong](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/Blinn%20Phong): `Shaders/Content/Shaders/Shading/Blinn Phong`
- [Microfacet BRDF](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/BRDF): `Shaders/Content/Shaders/Shading/BRDF`
- [Image Lighting](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/BRDF%20IBL): `Shaders/Content/Shaders/Shading/BRDF IBL`
- [Environment Lighting](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/Environment%20Lighting): `Shaders/Content/Shaders/Shading/Environment Lighting`
- [Environment Reflections](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading): `Shaders/Content/Shaders/Shading`
- [Shading Primitives](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/Primitives): `Shaders/Content/Shaders/Shading/Primitives`

### Surface Effects

- [Geometry Effects](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Geometry): `Shaders/Content/Shaders/Geometry`
- [Parallax Effects](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Parallax): `Shaders/Content/Shaders/Parallax`
- [Fur Shells](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Geometry/Fur): `Shaders/Content/Shaders/Geometry/Fur`
- [Toon Shading](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/ToonShading): `Shaders/Content/Shaders/Shading/ToonShading`
- [Translucency](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/Translucency): `Shaders/Content/Shaders/Shading/Translucency`
- [Wrap Shading](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Shaders/Shading/WrapShading): `Shaders/Content/Shaders/Shading/WrapShading`

### Sample Content

- [Example Scenes](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Scenes): `Shaders/Content/Scenes`
- [Shared Assets](https://github.com/jcant0n/shaderlibrary/tree/main/Shaders/Content/Common): `Shaders/Content/Common`

### Other components

- **Viewer**

## Connections

- Viewer → DX11 Host: runs
- Viewer → DX12 Host: runs
- Viewer → OpenGL Host: runs
- Viewer → Vulkan Host: runs
- DX11 Host → Application: drives
- DX12 Host → Application: drives
- OpenGL Host → Application: drives
- Vulkan Host → Application: drives
- Application → Scene Setup: loads
- Application → Example Scenes: loads LightingTechniques
- Scene Setup → Shared Assets: registers physics
