PBR-Shaders
PBR-Shaders copied to clipboard
Standard PBR shader written in Unity Cg
PBR-Shaders
Intro
PBR-Shaders is a set of shader programs written in Cg to demonstrate how to implement a PBR roughness/metallic workflow for your graphical application.
The physical model for the BRDF consists of:
- Lambert - diffuse component
- Cook-Torrance - specular component
The lighting models are:
- Directional light
- Point light
- Spot light
- Image-based lighting using environment maps
Samples

Structure
The Assets folder contains the shader library, textures, materials and demo scenes.
| Folder | Description |
|---|---|
| Shaders | PBRLib.cginc & PBRShader.shader are both the PBR function library and main PBR shader program |
| Materials | Sample materials such as gold, rough stone, slippery rock, walls, etc. |
| Textures | Data for the roughness/metallic workflow, albedo, occlusion and environment maps |
| Scenes | Just demo scenes |
Credits
PBR textures:
- cc0
- FreePBR
- Poliigon (here I've only used the free ones, but it's definitely worth getting a subscription)
Environment maps:
License
MIT