# bentobaux/separable-subsurface-scattering-in-unity-6 architecture

> Architecture diagram of the GitHub repository bentobaux/separable-subsurface-scattering-in-unity-6, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bentobaux/separable-subsurface-scattering-in-unity-6
- Repository: https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6

## Overview

This is a Unity 6 URP implementation and showcase of separable subsurface scattering (SSS). Its documented render workflow separates diffuse, specular, and ambient lighting into multiple render targets, blurs the diffuse lighting separably, then composites the result into the final image. The tree also contains SSS/PBR shaders, render-feature scripts, GUI scripts, and sample scenes. Source excerpts were unavailable, so implementation-level calls and scene wiring are not asserted.

Main entry points: [`Assets/Scenes`](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Scenes) (Sample scenes), [`Assets/Shaders/SSSS Master.shader`](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/SSSS%20Master.shader) (SSS master shader), [`Assets/Shaders/PBR Master.shader`](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/PBR%20Master.shader) (PBR master shader), [`Assets/Scripts/SSSSRender/SSSSRenderFeature.cs`](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/SSSSRender/SSSSRenderFeature.cs) (SSS render feature)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_render["Render pipeline"]
  node_feature["SSS render feature"]
  node_pass["SSS render pass<br/>[SSSSRenderPass.cs]"]
  node_targets["Lighting targets<br/>[SSSSRenderPass.cs]"]
  node_blur["Diffuse blur"]
  node_compositor["SSS compositor<br/>[Compositor.shader]"]
end

subgraph group_shading["Shading"]
  node_sss_master["SSS master shader<br/>[SSSS Master.shader]"]
  node_pbr_master["PBR master shader<br/>[PBR Master.shader]"]
  node_sss_lighting["SSS lighting models"]
  node_lighting["Lighting models"]
  node_sss_util["SSS transmission"]
  node_pbr_helpers["PBR helpers<br/>[PBRHelper.hlsl]"]
end

subgraph group_showcase["Showcase"]
  node_scenes["Sample scenes"]
  node_gui["Material GUI"]
  node_materials["Showcase materials"]
  node_lights["Animated lighting"]
  node_skybox["Skybox update<br/>[SkyboxUpdate.cs]"]
end

node_artist(("Artist"))

node_artist -.->|"views showcase"| node_scenes
node_scenes -.->|"renders with"| node_feature
node_feature -.->|"configures"| node_pass
node_pass -->|"separates lighting"| node_targets
node_targets -->|"blurs diffuse"| node_blur
node_blur -->|"feeds composite"| node_compositor
node_compositor -->|"outputs final image"| node_artist
node_sss_master -.->|"uses SSS models"| node_sss_lighting
node_pbr_master -.->|"uses lighting models"| node_lighting
node_sss_master -.->|"uses transmission"| node_sss_util
node_pbr_master -.->|"uses helpers"| node_pbr_helpers
node_gui -.->|"tunes materials"| node_materials
node_scenes -.->|"showcases"| node_materials
node_scenes -.->|"animates lighting"| node_lights
node_scenes -.->|"updates skybox"| node_skybox

click node_scenes "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Scenes"
click node_gui "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Scripts/GUI"
click node_feature "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/SSSSRender/SSSSRenderFeature.cs"
click node_pass "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/SSSSRender/SSSSRenderPass.cs"
click node_targets "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/SSSSRender/SSSSRenderPass.cs"
click node_blur "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/Library/SSS%20Util/ArtistFriendlyKernel.shader"
click node_compositor "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/Library/SSS%20Util/Compositor.shader"
click node_sss_master "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/SSSS%20Master.shader"
click node_pbr_master "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/PBR%20Master.shader"
click node_sss_lighting "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Shaders/Library/Lighting/SSSS"
click node_lighting "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Shaders/Library/Lighting"
click node_sss_util "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/Library/SSS%20Util/SSSSTransmission.hlsl"
click node_pbr_helpers "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/Library/Maths/PBRHelper.hlsl"
click node_materials "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Materials"
click node_lights "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/RandomPointLightMover.cs"
click node_skybox "https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/SkyboxUpdate.cs"

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_feature,node_pass,node_targets,node_blur,node_compositor toneBlue
class node_sss_master,node_pbr_master,node_sss_lighting,node_lighting,node_sss_util,node_pbr_helpers toneAmber
class node_scenes,node_gui,node_materials,node_lights,node_skybox toneMint
class node_artist toneIndigo
```

## Components

### Render pipeline

- [SSS render feature](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/SSSSRender/SSSSRenderFeature.cs): `Assets/Scripts/SSSSRender/SSSSRenderFeature.cs`
- [SSS render pass](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/SSSSRender/SSSSRenderPass.cs): `Assets/Scripts/SSSSRender/SSSSRenderPass.cs`
- [Lighting targets](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/SSSSRender/SSSSRenderPass.cs): `Assets/Scripts/SSSSRender/SSSSRenderPass.cs`
- [Diffuse blur](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/Library/SSS%20Util/ArtistFriendlyKernel.shader): `Assets/Shaders/Library/SSS Util/ArtistFriendlyKernel.shader`
- [SSS compositor](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/Library/SSS%20Util/Compositor.shader): `Assets/Shaders/Library/SSS Util/Compositor.shader`

### Shading

- [SSS master shader](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/SSSS%20Master.shader): `Assets/Shaders/SSSS Master.shader`
- [PBR master shader](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/PBR%20Master.shader): `Assets/Shaders/PBR Master.shader`
- [SSS lighting models](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Shaders/Library/Lighting/SSSS): `Assets/Shaders/Library/Lighting/SSSS`
- [Lighting models](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Shaders/Library/Lighting): `Assets/Shaders/Library/Lighting`
- [SSS transmission](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/Library/SSS%20Util/SSSSTransmission.hlsl): `Assets/Shaders/Library/SSS Util/SSSSTransmission.hlsl`
- [PBR helpers](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Shaders/Library/Maths/PBRHelper.hlsl): `Assets/Shaders/Library/Maths/PBRHelper.hlsl`

### Showcase

- [Sample scenes](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Scenes): `Assets/Scenes`
- [Material GUI](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Scripts/GUI): `Assets/Scripts/GUI`
- [Showcase materials](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/tree/master/Assets/Materials): `Assets/Materials`
- [Animated lighting](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/RandomPointLightMover.cs): `Assets/Scripts/RandomPointLightMover.cs`
- [Skybox update](https://github.com/bentobaux/separable-subsurface-scattering-in-unity-6/blob/master/Assets/Scripts/SkyboxUpdate.cs): `Assets/Scripts/SkyboxUpdate.cs`

### Other components

- **Artist**

## Connections

- Artist → Sample scenes: views showcase
- Sample scenes → SSS render feature: renders with
- SSS render feature → SSS render pass: configures
- SSS render pass → Lighting targets: separates lighting (evidence: `README.md`)
- Lighting targets → Diffuse blur: blurs diffuse (evidence: `README.md`)
- Diffuse blur → SSS compositor: feeds composite (evidence: `README.md`)
- SSS compositor → Artist: outputs final image (evidence: `README.md`)
- SSS master shader → SSS lighting models: uses SSS models
- PBR master shader → Lighting models: uses lighting models
- SSS master shader → SSS transmission: uses transmission
- PBR master shader → PBR helpers: uses helpers
- Material GUI → Showcase materials: tunes materials
- Sample scenes → Showcase materials: showcases
- Sample scenes → Animated lighting: animates lighting
- Sample scenes → Skybox update: updates skybox
