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
Binary file added Graphs.docx
Binary file not shown.
61 changes: 53 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,64 @@
CUDA Rasterizer
===============

[CLICK ME FOR INSTRUCTION OF THIS PROJECT](./INSTRUCTION.md)
**University of Pennsylvania, CIS 565: GPU Programming and Architecture,
Project 3 - CUDA Path Tracer**

**University of Pennsylvania, CIS 565: GPU Programming and Architecture, Project 4**
* Vasu Mahesh
* [LinkedIn](http://linkedin.com/in/vasumahesh)
* [Code Blog](http://www.codeplaysleep.com)

* (TODO) YOUR NAME HERE
* (TODO) [LinkedIn](), [personal website](), [twitter](), etc.
* Tested on: (TODO) Windows 22, i7-2222 @ 2.22GHz 22GB, GTX 222 222MB (Moore 2222 Lab)

### (TODO: Your README)
![](images/cover.PNG)

*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.
### Algorithm performance

```
Algorithm 1:

Go through every Y in AABB of Triangle:
Go through every X in AABB of Triangle:
if inside Triangle:
Shade Pixel

// -----

Algorithm 2:

Go through every Y in AABB of Triangle:
Find the range of X to fill for the triangle by intersecting the 3 line segments

Go through every X in range of Triangle:
Shade Pixel
```

![](images/triangle_fill_graph.PNG)


### Perspective Correct Color interpolation

Correct Barycentric Interpolation

![](images/color_bary_interp.PNG)


### Texture Sampling

Implemented basic texture sampling

![](images/texture.PNG)


### Anti-aliasing

Implemented super sampled AA

![](images/aa_graph.PNG)


| With AA | No AA |
|:-----:|:-------:|
|![](images/Duck4X.PNG)|![](images/DuckNoAA.PNG) |

### Credits

Expand Down
Binary file added gltfs/box/Empty box.bin
Binary file not shown.
183 changes: 183 additions & 0 deletions gltfs/box/Empty box.gltf
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"accessors": [
{
"bufferView": 0,
"byteOffset": 0,
"componentType": 5123,
"count": 228,
"max": [
227.0
],
"min": [
0.0
],
"name": "buffer-0-accessor-indices-buffer-0-mesh-0",
"type": "SCALAR"
},
{
"bufferView": 2,
"byteOffset": 0,
"componentType": 5126,
"count": 228,
"max": [
0.0,
201429.6875,
699870.625
],
"min": [
-781469.8125,
-664.0,
0.0
],
"name": "buffer-0-accessor-position-buffer-0-mesh-0",
"type": "VEC3"
},
{
"bufferView": 2,
"byteOffset": 2736,
"componentType": 5126,
"count": 228,
"max": [
1.0,
1.0,
1.0
],
"min": [
-1.0,
-1.0,
-1.0
],
"name": "buffer-0-accessor-normal-buffer-0-mesh-0",
"type": "VEC3"
},
{
"bufferView": 1,
"byteOffset": 0,
"componentType": 5126,
"count": 228,
"max": [
1.0,
0.0
],
"min": [
0.0,
-1.0
],
"name": "buffer-0-accessor-texcoord-buffer-0-mesh-0",
"type": "VEC2"
},
{
"bufferView": 3,
"byteOffset": 0,
"componentType": 5126,
"count": 0,
"max": [
0.0,
0.0,
0.0,
0.0
],
"min": [
0.0,
0.0,
0.0,
0.0
],
"name": "buffer-0-accessor-color-buffer-0-mesh-0",
"type": "VEC4"
}
],
"asset": {
"generator": "Obj2GltfConverter",
"version": "2.0"
},
"bufferViews": [
{
"buffer": 0,
"byteLength": 456,
"byteOffset": 0,
"byteStride": 0,
"name": "buffer-0-bufferview-ushort",
"target": 34963
},
{
"buffer": 0,
"byteLength": 1824,
"byteOffset": 456,
"byteStride": 8,
"name": "buffer-0-bufferview-vec2",
"target": 34962
},
{
"buffer": 0,
"byteLength": 5472,
"byteOffset": 2280,
"byteStride": 12,
"name": "buffer-0-bufferview-vec3",
"target": 34962
},
{
"buffer": 0,
"byteLength": 0,
"byteOffset": 7760,
"byteStride": 16,
"name": "buffer-0-bufferview-vec4",
"target": 34962
}
],
"buffers": [
{
"byteLength": 7760,
"name": "buffer-0",
"uri": "Empty box.bin"
}
],
"materials": [
{
"alphaMode": "OPAQUE",
"doubleSided": true,
"name": "wire_225143087",
"pbrMetallicRoughness": {
"baseColorFactor": [
0.8824,
0.5608,
0.3412,
1.0
],
"metallicFactor": 0.0,
"roughnessFactor": 0.9068708298809346
}
}
],
"meshes": [
{
"name": "buffer-0-mesh-0",
"primitives": [
{
"attributes": {
"POSITION": 1,
"NORMAL": 2,
"TEXCOORD_0": 3
},
"indices": 0,
"material": 0,
"mode": 4
}
]
}
],
"nodes": [
{
"mesh": 0,
"name": "node-0"
}
],
"scenes": [
{
"name": "scene-0",
"nodes": [
0
]
}
]
}
Binary file added gltfs/spheres/SphereMesh1.bin
Binary file not shown.
Loading