-
Notifications
You must be signed in to change notification settings - Fork 26
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
JivingTechnostic
wants to merge
20
commits into
CIS565-Fall-2014:master
Choose a base branch
from
JivingTechnostic:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Project 4 submission - Jiatong He #13
JivingTechnostic
wants to merge
20
commits into
CIS565-Fall-2014:master
from
JivingTechnostic:master
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Everything implemented other than depth testing.