# renanbomtempo/polygon-wind architecture

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

- Interactive diagram: https://gitdiagram.com/renanbomtempo/polygon-wind
- Repository: https://github.com/renanbomtempo/polygon-wind

## Overview

Polygon Wind Shader is a Unity shader for subtle, organic tree movement, intended especially for low-poly trees and not heavy wind. The documented workflow is to apply the shader to a material and the material to a tree asset. Shader parameters and mesh vertex colors influence the calculated vertex position: red marks branches for up/down movement, while blue marks leaves for wiggle. Only README-described relationships are shown; shader source was not available for inspection.

Main entry points: [`PW_Tree.shader`](https://github.com/renanbomtempo/polygon-wind/blob/master/PW_Tree.shader) (Polygon Wind Shader)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_shader["Polygon Wind Shader<br/>[PW_Tree.shader]"]
node_material["Unity Material"]
node_tree["Tree Mesh Asset"]
node_vertex_colors["Vertex Colors"]
node_wind_params["Wind Parameters"]
node_vertex_position["Final Vertex Position"]

node_user -->|"applies shader to"| node_material
node_user -->|"applies material to"| node_tree
node_shader -->|"applied to"| node_material
node_material -->|"applied to"| node_tree
node_tree -->|"provides colors"| node_vertex_colors
node_vertex_colors -->|"influence movement"| node_shader
node_wind_params -->|"configure movement"| node_shader
node_shader -->|"calculates"| node_vertex_position

click node_shader "https://github.com/renanbomtempo/polygon-wind/blob/master/PW_Tree.shader"

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_user toneBlue
class node_shader toneTeal
class node_material,node_tree,node_vertex_colors,node_wind_params,node_vertex_position toneIndigo
```

## Components

### Other components

- **User**
- [Polygon Wind Shader](https://github.com/renanbomtempo/polygon-wind/blob/master/PW_Tree.shader): `PW_Tree.shader`
- **Unity Material**
- **Tree Mesh Asset**
- **Vertex Colors**
- **Wind Parameters**
- **Final Vertex Position**

## Connections

- User → Unity Material: applies shader to (evidence: `README.md`)
- User → Tree Mesh Asset: applies material to (evidence: `README.md`)
- Polygon Wind Shader → Unity Material: applied to (evidence: `README.md`)
- Unity Material → Tree Mesh Asset: applied to (evidence: `README.md`)
- Tree Mesh Asset → Vertex Colors: provides colors (evidence: `README.md`)
- Vertex Colors → Polygon Wind Shader: influence movement (evidence: `README.md`)
- Wind Parameters → Polygon Wind Shader: configure movement (evidence: `README.md`)
- Polygon Wind Shader → Final Vertex Position: calculates (evidence: `README.md`)
