Coder Social home page Coder Social logo

penumbra23 / pbr-shaders Goto Github PK

View Code? Open in Web Editor NEW
51.0 4.0 15.0 235.25 MB

Standard PBR shader written in Unity Cg

License: MIT License

HLSL 24.77% ShaderLab 75.23%
physically-based-rendering unity3d shader shaderlab cg game-engine-3d game-development glsl hlsl pbr-shaders

pbr-shaders's Introduction

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

pbr-shaders's People

Contributors

penumbra23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.