Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,28 @@ WebGL Forward+ and Clustered Deferred Shading

**University of Pennsylvania, CIS 565: GPU Programming and Architecture, Project 5**

* (TODO) YOUR NAME HERE
* Tested on: (TODO) **Google Chrome 222.2** on
Windows 22, i7-2222 @ 2.22GHz 22GB, GTX 222 222MB (Moore 2222 Lab)

### Live Online

[![](img/thumb.png)](http://TODO.github.io/Project5-WebGL-Forward-Plus-and-Clustered-Deferred)
* Shenyue Chen
* [LinkedIn](https://www.linkedin.com/in/shenyue-chen-5b2728119/), [personal website](http://github.com/EvsChen)
* Tested on: MacOS, 2.6 GHz 6-Core Intel Core i7, Radeon Pro 555X 4 GB

### Demo Video/GIF

[![](img/video.png)](TODO)

### (TODO: Your README)

*DO NOT* leave the README to the last minute! It is a crucial part of the
project, and we will not be able to grade you without a good README.

This assignment has a considerable amount of performance analysis compared
to implementation work. Complete the implementation early to leave time!

[Demo video on Youtube](https://youtu.be/LtUG5TZRfDE)

### Features
* Forward+ rendering
* Clustered deferred rendering
* Blinn-phong specular shading in deferred rendering
* Two-component normal

### Performance analysis
#### Comparison between the three methods
Generally, in terms of the rendering speed, Forward < Forward+ < Deferred Clustered in all cases. I measure the FPS for the three methods in relation to the number of lights in the scene.
<p align="center">
<img src="./numLights.png" />
</p>

#### Using 2-component normal
Using 2-component normal will reduce the space occupied by the G-Buffer. But due to the extra computation worload it introduces, it may not be able to improve the performance significantly.

### Credits

Expand Down
18 changes: 18 additions & 0 deletions analyze.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import matplotlib.pyplot as plt

fig, ax = plt.subplots()

numLights = [100, 150, 200, 250, 300]
forwardFPS = [27, 18, 13, 11, 9]
forwardPlusFPS = [33, 25, 18, 21, 12]
deferredFPS = [53, 38, 35, 36, 23]

plt.plot(numLights, forwardFPS, label="Forward")
plt.plot(numLights, forwardPlusFPS, label="Forward+")
plt.plot(numLights, deferredFPS, label="Deferred clustered")

plt.title("Rendering speed comparison for different number of lights")
plt.xlabel("Number of lights in the scene")
plt.ylabel("FPS")
plt.legend()
plt.show()
Binary file added numLights.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading