# yashwanthcb/vkpbr architecture

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

- Interactive diagram: https://gitdiagram.com/yashwanthcb/vkpbr
- Repository: https://github.com/yashwanthcb/vkpbr

## Overview

vkPBR is a Vulkan-based physically based rendering demo. Its visible workflow initializes a GLFW window, builds a scene with material and transform data, constructs the renderer with that window and scene, then repeatedly draws frames. The README identifies Cook–Torrance/GGX lighting with Smith geometry, Schlick Fresnel, and inverse-square point lights. The renderer implementation was read but its detailed internals are not excerpted here, so the graph keeps those responsibilities together and avoids inferring internal rendering stages or utility calls.

Main entry points: [`src/Application.cpp`](https://github.com/yashwanthcb/vkpbr/blob/main/src/Application.cpp) (Application Loop), [`src/RendererPBR.cpp`](https://github.com/yashwanthcb/vkpbr/blob/main/src/RendererPBR.cpp) (PBR Renderer), [`src/Scene.cpp`](https://github.com/yashwanthcb/vkpbr/blob/main/src/Scene.cpp) (Scene Entities), [`thirdparty/includes/GLFW/glfw3.h`](https://github.com/yashwanthcb/vkpbr/blob/main/thirdparty/includes/GLFW/glfw3.h) (GLFW Windowing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application"]
  node_app["Application Loop<br/>[Application.cpp]"]
end

subgraph group_scene["Scene Data"]
  node_scene["Scene Entities<br/>[Scene.cpp]"]
end

subgraph group_rendering["Rendering"]
  node_renderer["PBR Renderer<br/>[RendererPBR.cpp]"]
  node_util["Rendering Utilities<br/>[Util.cpp]"]
end

node_user(("User"))
node_glfw["GLFW Windowing<br/>[glfw3.h]"]
node_vulkan["Vulkan API"]

node_user -.->|"runs"| node_app
node_app -->|"creates window"| node_glfw
node_app -->|"builds scene"| node_scene
node_app -->|"constructs and draws"| node_renderer
node_renderer -->|"receives scene"| node_scene
node_renderer -->|"renders with"| node_vulkan

click node_app "https://github.com/yashwanthcb/vkpbr/blob/main/src/Application.cpp"
click node_glfw "https://github.com/yashwanthcb/vkpbr/blob/main/thirdparty/includes/GLFW/glfw3.h"
click node_scene "https://github.com/yashwanthcb/vkpbr/blob/main/src/Scene.cpp"
click node_renderer "https://github.com/yashwanthcb/vkpbr/blob/main/src/RendererPBR.cpp"
click node_util "https://github.com/yashwanthcb/vkpbr/blob/main/src/Util.cpp"

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_user toneBlue
class node_scene toneAmber
class node_renderer,node_util,node_vulkan toneMint
class node_glfw toneTeal
```

## Components

### Application

- [Application Loop](https://github.com/yashwanthcb/vkpbr/blob/main/src/Application.cpp): `src/Application.cpp`

### Scene Data

- [Scene Entities](https://github.com/yashwanthcb/vkpbr/blob/main/src/Scene.cpp): `src/Scene.cpp`

### Rendering

- [PBR Renderer](https://github.com/yashwanthcb/vkpbr/blob/main/src/RendererPBR.cpp): `src/RendererPBR.cpp`
- [Rendering Utilities](https://github.com/yashwanthcb/vkpbr/blob/main/src/Util.cpp): `src/Util.cpp`

### Other components

- **User**
- [GLFW Windowing](https://github.com/yashwanthcb/vkpbr/blob/main/thirdparty/includes/GLFW/glfw3.h): `thirdparty/includes/GLFW/glfw3.h`
- **Vulkan API**

## Connections

- User → Application Loop: runs
- Application Loop → GLFW Windowing: creates window (evidence: `src/Application.cpp`)
- Application Loop → Scene Entities: builds scene (evidence: `src/Application.cpp`)
- Application Loop → PBR Renderer: constructs and draws (evidence: `src/Application.cpp`)
- PBR Renderer → Scene Entities: receives scene
- PBR Renderer → Vulkan API: renders with
