Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
markandrus committed Feb 18, 2012
1 parent 49a277e commit 09e0a6b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Project 2
=========

Usage
-----
Project 2 should be run just as `./proj2`; however, it is built so that it can be passed a default
shader to start in.

$ ./proj2 -h
usage: ./proj2 [<vertshader> <fragshader>]
Call `./proj2', optionally taking a default pair of vertex and fragment
shaders to render. Otherwise we just load our stack of shaders.

### Value Interaction
Our project two lets you view 4 scenes by pressing keys 1, 2, 3 and 4, respectively. In each scene,
the variables `Ka`, `Ks`, `Kd`, `shexp`, and `bkgr color` may be manipulated interactively, in
addition to the following scene-specific variables:
1. Gouraud and Phong shading on an untextured sphere
2. Per-vertex texturing versus "real" texturing, with or without seam correction on a sphere
textured with the UChicago seal
3. Filtering modes when applying a repeated texture (`rgb-check.png`) to a plane
4. Bump-mapping modes (Disabled, Bump, or Parallax) on a sphere textured with the UChicago seal

### 3D Interaction
Our project implements all interactons from project 1 (though in a few cases they same glitchier).
- Light can be rotated
- Models can be zoomed in and out via translation or FOV changes
- etc.
4 changes: 2 additions & 2 deletions parallax.frag
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ void main() {

// calculate new normal
vec3 n;
n.x = vnrm.x + b.x;
n.y = vnrm.y + b.y;
n.x = vnrm.x + b.x*2;
n.y = vnrm.y + b.y*2;
n.z = vnrm.z;

vec3 diff = Kd * max(0.0, dot(n, lightDir)) * a.rgb;
Expand Down
5 changes: 5 additions & 0 deletions proj2.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Project 2: by Mark (andrus) and Shir (shiryehoshua)
//
// Please see Mark's dir for source (andrus)
//
//
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down

0 comments on commit 09e0a6b

Please sign in to comment.