# bamdaniyanaresh-png/naresh-renderdragon architecture

> Architecture diagram of the GitHub repository bamdaniyanaresh-png/naresh-renderdragon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bamdaniyanaresh-png/naresh-renderdragon
- Repository: https://github.com/bamdaniyanaresh-png/naresh-renderdragon

## Overview

Naresh Render Dragon Shader is a Minecraft Bedrock shader pack. Its runtime workflow is shader materials rendering the sky and world, with shared code for lighting, weather, reflections, and tone mapping; separate material families cover actors, items, and the End. The README identifies `lib/` as shared shader code, while the source index and excerpts establish the internal include relationships shown here. Other material-to-module call details were not sampled, so those links are omitted.

Main entry points: [`lib/nrs_math.h`](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/nrs_math.h) (Math And Noise), [`lib/terrain.h`](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/terrain.h) (Terrain Shading), [`lib/sky.h`](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/sky.h) (Sky Rendering), [`lib/daylight.h`](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/daylight.h) (Daylight Lighting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_materials["Render Materials"]
  node_materials["Shader Materials"]
  node_chunks["Chunk Material"]
  node_actors["Actor Materials"]
  node_items["Hand Item Materials"]
  node_endmaterial["End Sky Material"]
end

subgraph group_world["World Rendering"]
  node_terrain["Terrain Shading<br/>[terrain.h]"]
  node_entity["Entity Shading<br/>[entity.h]"]
  node_torch["Block Light<br/>[torch.h]"]
  node_tone["Tone Mapping<br/>[tone.h]"]
end

subgraph group_effects["Sky And Weather"]
  node_sky["Sky Rendering<br/>[sky.h]"]
  node_clouds["Cloud Layers<br/>[clouds.h]"]
  node_stars["Night Stars<br/>[stars.h]"]
  node_daylight["Daylight Lighting<br/>[daylight.h]"]
  node_rain["Rain Effects<br/>[rain.h]"]
  node_endingsky["End Sky Effects<br/>[endsky.h]"]
  node_tornado["End Tornado<br/>[tornado.h]"]
end

subgraph group_shared["Shared Shader Logic"]
  node_settings["Shader Settings<br/>[settings.h]"]
  node_math["Math And Noise<br/>[nrs_math.h]"]
end

node_game(("Minecraft Bedrock"))

node_game -->|"renders with"| node_materials
node_materials -->|"shares code"| node_terrain
node_chunks -.->|"shades terrain"| node_terrain
node_actors -.->|"shades actors"| node_entity
node_items -.->|"shades items"| node_entity
node_endmaterial -.->|"uses effects"| node_endingsky
node_terrain -->|"includes"| node_sky
node_terrain -->|"includes"| node_rain
node_terrain -->|"includes"| node_torch
node_terrain -->|"includes"| node_tone
node_entity -->|"uses shading"| node_terrain
node_sky -->|"includes"| node_daylight
node_sky -->|"includes"| node_stars
node_sky -->|"includes"| node_clouds
node_sky -->|"gets sun light"| node_daylight
node_clouds -->|"uses lighting"| node_daylight
node_math -->|"includes"| node_settings
node_daylight -->|"uses helpers"| node_math
node_stars -->|"uses noise"| node_math
node_rain -->|"uses noise"| node_math
node_tone -->|"uses helpers"| node_math
node_torch -->|"uses helpers"| node_math
node_endingsky -->|"uses helpers"| node_math
node_tornado -->|"uses noise"| node_math

click node_materials "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/tree/main/shaders"
click node_chunks "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/tree/main/shaders/RenderChunk"
click node_actors "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/tree/main/shaders/Actor"
click node_items "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/tree/main/shaders/ItemInHandTextured"
click node_endmaterial "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/tree/main/shaders/EndSky"
click node_terrain "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/terrain.h"
click node_entity "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/entity.h"
click node_torch "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/torch.h"
click node_tone "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/tone.h"
click node_sky "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/sky.h"
click node_clouds "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/clouds.h"
click node_stars "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/stars.h"
click node_daylight "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/daylight.h"
click node_rain "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/rain.h"
click node_endingsky "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/endsky.h"
click node_tornado "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/tornado.h"
click node_settings "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/settings.h"
click node_math "https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/nrs_math.h"

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_materials,node_chunks,node_actors,node_items,node_endmaterial toneBlue
class node_terrain,node_entity,node_torch,node_tone toneAmber
class node_sky,node_clouds,node_stars,node_daylight,node_rain,node_endingsky,node_tornado toneMint
class node_settings,node_math toneRose
class node_game toneIndigo
```

## Components

### Render Materials

- [Shader Materials](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/tree/main/shaders): `shaders`
- [Chunk Material](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/tree/main/shaders/RenderChunk): `shaders/RenderChunk`
- [Actor Materials](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/tree/main/shaders/Actor): `shaders/Actor`
- [Hand Item Materials](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/tree/main/shaders/ItemInHandTextured): `shaders/ItemInHandTextured`
- [End Sky Material](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/tree/main/shaders/EndSky): `shaders/EndSky`

### World Rendering

- [Terrain Shading](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/terrain.h): `lib/terrain.h`
- [Entity Shading](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/entity.h): `lib/entity.h`
- [Block Light](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/torch.h): `lib/torch.h`
- [Tone Mapping](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/tone.h): `lib/tone.h`

### Sky And Weather

- [Sky Rendering](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/sky.h): `lib/sky.h`
- [Cloud Layers](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/clouds.h): `lib/clouds.h`
- [Night Stars](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/stars.h): `lib/stars.h`
- [Daylight Lighting](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/daylight.h): `lib/daylight.h`
- [Rain Effects](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/rain.h): `lib/rain.h`
- [End Sky Effects](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/endsky.h): `lib/endsky.h`
- [End Tornado](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/tornado.h): `lib/tornado.h`

### Shared Shader Logic

- [Shader Settings](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/settings.h): `lib/settings.h`
- [Math And Noise](https://github.com/bamdaniyanaresh-png/naresh-renderdragon/blob/main/lib/nrs_math.h): `lib/nrs_math.h`

### Other components

- **Minecraft Bedrock**

## Connections

- Minecraft Bedrock → Shader Materials: renders with (evidence: `README.md`)
- Shader Materials → Terrain Shading: shares code (evidence: `README.md`)
- Chunk Material → Terrain Shading: shades terrain
- Actor Materials → Entity Shading: shades actors
- Hand Item Materials → Entity Shading: shades items
- End Sky Material → End Sky Effects: uses effects
- Terrain Shading → Sky Rendering: includes (evidence: `lib/terrain.h`)
- Terrain Shading → Rain Effects: includes (evidence: `lib/terrain.h`)
- Terrain Shading → Block Light: includes (evidence: `lib/terrain.h`)
- Terrain Shading → Tone Mapping: includes (evidence: `lib/terrain.h`)
- Entity Shading → Terrain Shading: uses shading (evidence: `lib/entity.h`)
- Sky Rendering → Daylight Lighting: includes (evidence: `lib/sky.h`)
- Sky Rendering → Night Stars: includes (evidence: `lib/sky.h`)
- Sky Rendering → Cloud Layers: includes (evidence: `lib/sky.h`)
- Sky Rendering → Daylight Lighting: gets sun light (evidence: `lib/sky.h`)
- Cloud Layers → Daylight Lighting: uses lighting (evidence: `lib/clouds.h`)
- Math And Noise → Shader Settings: includes (evidence: `lib/nrs_math.h`)
- Daylight Lighting → Math And Noise: uses helpers (evidence: `lib/daylight.h`)
- Night Stars → Math And Noise: uses noise (evidence: `lib/stars.h`)
- Rain Effects → Math And Noise: uses noise (evidence: `lib/rain.h`)
- Tone Mapping → Math And Noise: uses helpers (evidence: `lib/tone.h`)
- Block Light → Math And Noise: uses helpers (evidence: `lib/torch.h`)
- End Sky Effects → Math And Noise: uses helpers (evidence: `lib/endsky.h`)
- End Tornado → Math And Noise: uses noise (evidence: `lib/tornado.h`)
