Skip to content

Standard PBR shader written in Unity Cg

License

Notifications You must be signed in to change notification settings

penumbra23/PBR-Shaders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Sample1 Sample1 Sample1

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