Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submission: Kangning Li #14

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
7a81925
started the first try rasterizer. compiles but crashes video driver, …
Oct 7, 2015
5bf16e3
added some debugs, take a look. it's probably the part where you allo…
Oct 7, 2015
03b5bf2
ONE TRIANGLE YEAAAAA
likangning93 Oct 8, 2015
c9be451
fixed a little thing with pixel coordinates. added a frag shader out …
likangning93 Oct 10, 2015
8e41315
added camera stuff and skeleton for the proper rasterizer. also somet…
likangning93 Oct 10, 2015
499a790
fixed some stuff with scanline... still need to resolve clipping issue
likangning93 Oct 10, 2015
db5fb6b
added camera controls so we can figure out wtf is up with depth test
likangning93 Oct 10, 2015
fddf4cf
depth test is working more
likangning93 Oct 11, 2015
9a749d7
moved crappy rasterizer into its own file. now starting work on the R…
likangning93 Oct 11, 2015
f1f6d28
fixed compilation bug
likangning93 Oct 11, 2015
e6d5210
up to speed with the 'real' rasterizer. now need to do atomics
likangning93 Oct 11, 2015
a8d3255
handling race conditions using an int depth grid and atomicMin
likangning93 Oct 11, 2015
f947710
added lights and phong shading
likangning93 Oct 11, 2015
359b2ab
NOT SO ORTHOGRAPHIC NOW ARE WE
likangning93 Oct 12, 2015
25eaf4a
updated notes.
likangning93 Oct 12, 2015
60a0352
really this time
likangning93 Oct 12, 2015
a2ff93d
added some new kernels to handle instancing
Oct 14, 2015
20029c1
modifying code in rasterize to support instancing
likangning93 Oct 14, 2015
380fad3
ready to test instancing
likangning93 Oct 14, 2015
1b4300b
instancing is WORKING
likangning93 Oct 14, 2015
637076e
added components for MSAA and modularized scanline
likangning93 Oct 15, 2015
7d6d69a
added more parts
likangning93 Oct 15, 2015
2f0dca2
FSAA working, MSAA not so much
likangning93 Oct 15, 2015
4573589
ok MSAA seems to be working!
likangning93 Oct 15, 2015
684d07d
added tile pipeline rasterization notes
likangning93 Oct 16, 2015
e27c31a
updated notes on tiling again
likangning93 Oct 16, 2015
eeacfd2
started adding structs and... stuff for tiling
likangning93 Oct 16, 2015
8833fd1
more tiling setup
likangning93 Oct 17, 2015
074b5c8
fixed a little bug in MSAA where the first triangle wasn't getting sh…
likangning93 Oct 17, 2015
e970131
added primitive/tile binning kernel
likangning93 Oct 17, 2015
bf869b8
added tiled scanline. scary. please check and test.
likangning93 Oct 17, 2015
f5c198f
debugging
likangning93 Oct 17, 2015
bf88ee5
now debugging the tile scanline
likangning93 Oct 17, 2015
bae6f0f
progress! now have to figure out why it doesn't work for any other case
likangning93 Oct 17, 2015
1ffb720
now tiling works up to width 160 x 160, 100 tiles
likangning93 Oct 17, 2015
c5a1c07
small fixes. still problems.
likangning93 Oct 17, 2015
e0aaa83
tiny tweak, now seems to work with resos up to 336 336 and general tr…
likangning93 Oct 17, 2015
ab05d28
fixed tiling and clipping issue, which also seemed to fix reso drawin…
likangning93 Oct 17, 2015
3fd3b21
added tile bin wiping between draws.
likangning93 Oct 17, 2015
11008d3
tried dimming contrast in tile grid so it's less painful to look at
likangning93 Oct 17, 2015
e14c9dc
fixed the worst of the grid effect thing
likangning93 Oct 17, 2015
4c82234
slight cleanup. beginning analysis.
likangning93 Oct 18, 2015
18be319
finalized block sizes for now
likangning93 Oct 18, 2015
48f2a99
all data gathered, all charts made
likangning93 Oct 18, 2015
347d70b
started nice readme
likangning93 Oct 18, 2015
202ad49
updates to readme. on instancing
likangning93 Oct 18, 2015
753f086
small fixes
likangning93 Oct 18, 2015
a64cdf4
added antialiasing section
likangning93 Oct 18, 2015
468b8a1
small fixes
likangning93 Oct 18, 2015
46fa022
changed some images to spreads
likangning93 Oct 18, 2015
55bbc39
added tiling section
likangning93 Oct 18, 2015
3fe74d8
added chart
likangning93 Oct 18, 2015
54c611b
typos. also, can i embed?
likangning93 Oct 18, 2015
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
Prev Previous commit
Next Next commit
tiny tweak, now seems to work with resos up to 336 336 and general tr…
…ansformations and instancing?
likangning93 committed Oct 17, 2015
commit e0aaa83d4d6bff8de534b04745a22d40e4bd2588
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -119,8 +119,8 @@ bool init(obj *mesh) {
return false;
}

width = 176;
height = 176;
width = 336;
height = 336;
window = glfwCreateWindow(width, height, "CIS 565 Pathtracer", NULL, NULL);
if (!window) {
glfwTerminate();
@@ -180,7 +180,7 @@ bool init(obj *mesh) {
glm::mat4 ID = glm::mat4();
std::vector<glm::mat4> transformations;
transformations.push_back(ID);
//transformations.push_back(glm::translate(ID, glm::vec3(-0.4f, -0.5f, 0.05f)));
transformations.push_back(glm::translate(ID, glm::vec3(-0.4f, -0.5f, 0.05f)));
//transformations.push_back(glm::translate(ID, glm::vec3(1.0f, 0.0f, 0.0f)));
//transformations.push_back(glm::translate(ID, glm::vec3(-1.0f, 0.0f, 0.0f)) *
// glm::scale(ID, glm::vec3(2.0f, 2.0f, 2.0f)));
5 changes: 3 additions & 2 deletions src/rasterize.cu
Original file line number Diff line number Diff line change
@@ -683,6 +683,7 @@ __global__ void tileScanline(int numTiles, Tile *dev_tiles, int numPrimitives,
for (int i = startIdx; i < startIdx + numItemsPerThread; i++) {
if (i < thisTile.numPrimitives) {
int primitiveIndex = dev_primitiveIndices[thisTile.primitiveIndicesIndex + i];
//primitiveIndex = thisTile.primitiveIndicesIndex + i; // with this, it draws bins correctly.
Triangle thisTriangle = dev_primitives[primitiveIndex];
// get the AABB of the triangle
v[0] = thisTriangle.v[0].screenPos;
@@ -723,7 +724,7 @@ __global__ void tileScanline(int numTiles, Tile *dev_tiles, int numPrimitives,
// I've flipped the drawing system, so now it assumes 0,0 is in the bottom left.
int localX = x - thisTile.min.x;// + w / 2;
int localY = y - thisTile.min.y;// + h / 2;
int fragIndexLocal = ((localX - 1) + (localY - 1) * TILESIZE);
int fragIndexLocal = ((localX) + (localY) * TILESIZE);
glm::vec3 baryCoordinate = calculateBarycentricCoordinate(v, fragCoord);
// check depth using bary. the version in utils returns a negative z for some reason
int zDepth = UINT16_MAX * -getZAtCoordinate(baryCoordinate, v);
@@ -757,7 +758,7 @@ __global__ void tileScanline(int numTiles, Tile *dev_tiles, int numPrimitives,
}
}
else break;
} */
}
numItemsPerThread = (TILESIZESQUARED + blockDim.x - 1) / blockDim.x;
startIdx = threadIdx.x * numItemsPerThread;
__syncthreads();