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

Project 4 submission - Jiatong He #13

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

JivingTechnostic
Copy link

Everything implemented other than depth testing.

JivingTechnostic and others added 20 commits October 25, 2014 21:46
Changed 2-space tabs to tabs.
Implemented Vertex/Fragment shaders
Currently finishing rasterizer
Implemented all features (bugs listed below)
- Blinn-Phong shader isn't working.  Normals are as expected, but the
light*mat is not.
- Some normals appear to be backwards for whatever reason.  Currently
regenerating all the normals using cross products and clockwise
triangles rather than relying on the .obj
- Some triangles create massive scanlines.  I suspect these are caused
by triangles with very large slopes (two point's y coordinates are
nearly equal).  Will be changing the code to fix this later.
- Code is SLOW.  Currently running at 8 fps or so, on cow.obj at half
screen.  It seems that having large triangles actually slows down
performance more since it's not parallelized.

* Backface culling using stream compaction implemented, simply gets rid
of triangles with normals that point towards the positive-z (away from
camera).
* Color interpolation is implemented, seems to make things slow.  Needs
further testing.
Caused by a few misunderstandings:
* +z axis is towards the camera
* .obj files list vertices in faces in counterclockwise order.
Fixed the extra-long scanline errors by using the interpolated
coordinate (which I was already calculating) instead of the slope.

Still having problems drawing certain types of triangles.  At the
moment, it seems like all triangles on the cow that aren't pointing
downward cannot draw correctly.
Fixed the not drawing upward-pointing triangles bug, the top half
triangle drawing code had rBound being set to pLeft.
All implemented features appear to be working.
- Normals are now read in from the .obj files, and kept in world space.
- The fragment shader uses an inverse view-projection matrix to compute
lighting in world-space.
- Performance has improved due to the above changes... somehow.  FPS has
doubled, though I release mode still gives memory errors.
- Moved old README to INSTRUCTIONS to prep for new README.
Put in mouse control, and some images that will need to be renamed.
More images and keyboard controls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant