Skip to content

vizi-rgb/phong-shading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Phong Shading Project

Description

This project demonstrates the implementation of Phong shading, a technique used to achieve realistic 3D shading by applying the Phong reflection model. The scene includes a single light source illuminating two spheres made of various materials. The materials used in this project include:

  • Metallic
  • Pearl
  • Bronze
  • Polished Bronze
  • Gold
  • Chrome
  • Wooden

Additionally, the project showcases two spheres with different lighting properties:

  • One sphere with minimum diffuse lighting and maximum specular lighting.
  • Another sphere with minimum specular lighting and maximum diffuse lighting.

Controls

  • Move Light Source:

    • Arrow Up: Move light source forwards.
    • Arrow Down: Move light source backwards.
    • Arrow Left: Move light source left.
    • Arrow Right: Move light source right.
    • Left Shift: Move light source up.
    • Left Control: Move light source down.
  • Cycle Through Materials:

    • B: Select previous material.
    • N: Select next material.

Demo

image image image image

Built With

  • Pygame: Pygame was used to build this project, providing the functionality for graphics, user input, and real-time updates.

Releases

No releases published

Packages

No packages published

Languages