[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Illuminating the scene with a point light source and implementing & comparing different lighting computation methods in OpenGL.

Notifications You must be signed in to change notification settings

divyanshu-talwar/Lighting-and-Shading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lighting-and-Shading

Illuminating the scene with a point light source and implementing & comparing different lighting computation methods in OpenGL.

In this project we:

  • Illuminate the scene by adding a point light source.
  • Insert objects (cube/sphere).
  • Compute per-vertex/per-fragment normals to the objects, to be used for lighting computations.
  • Implement and compare the following shading techniques:
    • Gouraud shading for diffuse lighting.
    • Phong lighting -- by computing per-vertex normals and all three lighting components: ambient, diffuse, and specular (α = 64).
    • Phong shading -- by computing per-fragment normals and all three lighting components: ambient, diffuse, and specular (α = 64).

Results

  1. Illuminate the scene by adding a point light source and objects (without shading):

    Cube Sphere
    cube_image sphere_image
  2. Gouraud shading (diffuse lighting):

  1. Phong lighting (per-vertex):

  1. Phong Shading (per-fragment):

Execution

  • Generate the object file:
    • mkdir build && cd build
    • cmake ..\
    • make
    • cd ../
  • Execute the object file:
    • ./bin/lighting_and_shading

About

Illuminating the scene with a point light source and implementing & comparing different lighting computation methods in OpenGL.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published