Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunxiang-Li authored Oct 10, 2020
1 parent 4c9f96e commit 742074d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ Then we have:

<div align="center"> <img src="https://github.com/Yunxiang-Li/Simple-3D-Render-Engine/blob/main/Screenshots%20and%20GIFs/Simple%20projection.gif"/> </div>


4. Now we need to start filling up those triangles with colors. To do this we need to rasterize the triangle - convert it to list of pixels on screen that it occupies.
I choose rasterization via barycentric coordinates since it is easier to implement. The idea is to compute barycentric coordinate for each pixel that could possibly lie inside the triangle and discard those that are outside.

Expand All @@ -68,6 +67,10 @@ After this, we have:

<div align="center"> <img src="https://github.com/Yunxiang-Li/Simple-3D-Render-Engine/blob/main/Screenshots%20and%20GIFs/Shader%20projection.gif"/> </div>

6. Finally, in order to change the tetrahedron to a sphere, we need to repeatedly subdivide each triangle into four smaller ones and keep inflating(here I choose to inflat 4 times for each triangle since my computer will become lag D:). Here is the final result:

<div align="center"> <img src="https://github.com/Yunxiang-Li/Simple-3D-Render-Engine/blob/main/Screenshots%20and%20GIFs/Final%20Sphere.gif"/> </div>

## Structure

The whole project in Unity contains two main folders, **Assets** folder and **Package** folder.
Expand Down

0 comments on commit 742074d

Please sign in to comment.