Code Monkey home page Code Monkey logo

cg_shaders's Introduction

Victor Frenkel
Computer Graphics HW3

--------------------------
WARNING: as of 10:30 AM, April 4th 2013, the clic-lab computers can't compile glsl shaders. I tried running the unaltered starter code and this error was given:

MSG: Initialize GLSL Shaders ...
Error: shader(0001), Info Log: �        8�J
Fail to compile vertex shader:
varying vec3 normal; 
 void main() 
 { 
 normal = gl_Normal; 
 gl_Position = ftransform(); 
 } 

Fail to create GLSL program

The same thing happened with my shaders, but not when I ran them on my computer.
--------------------------

INSTRUCTIONS:
type 'make' to compile and run. NOTE: code MUST be run on clic-lab.cs.columbia.edu, not clic.cs.columbia.edu. The configurations are different.

CONTROLS: W,A,S,D for movement/banking. press and hold 'o' key to use the follow cam, let go for the throwing cam.

	  ***IMPORTANT***: after you are done viewing a shader, press its number key again to disable it. You must disable one shader to look at another. Program starts with no shaders enabled.
          Hit 1 for gouraud phong shader.
	  Hit 2 for blinn phong shader.
	  Hit 3 for an experiment with normal map shader (not quite done, not in tangent space so it looks weird).
	  Hit 4 for a vertex position based checkerboard shader.
	  Hit 5 for a proper uv based checkerboard shader (showing distortions in teapot uv mapping).

Sources/Credits:
	Looked through lighthouse3d tutorials on glsl and lighting, directional lights.
	Looked through nullterminator.net tutorial on opengl textures.

	Used SOIL library for loading a jpg image into a char array.

	Used turbosquid for the tron bike model, by japrogramer.
	Swiftless tutorials, opengl documentation, opengl wikibooks

	http://www.opengl.org/sdk/docs/man2/
	http://www.swiftless.com/opengltuts.html
	http://www.nullterminator.net/gltexture.html
	http://en.wikibooks.org/wiki/OpenGL_Programming


Organization/Overview:
	shaders directory has all the shaders used.
	GLSLProgram.cpp/h was modified from the starter code version to provide shader loading from file capability. Contains shader handling code.
	revolutejoint.cpp/h has the individual joint rendering and transformation code.
	skeleton.cpp/h has the ik solver and skeleton rendering code (the tree of joints).
	camera.cpp/h has camera motion control and transforms.
	gridpiece.ccp/h has the flat grid object, along with its display list definition.
	linalg.h has some handy geometry functions.
	main.cpp has the opengl initialization, some simple lighting code, initial setup.
	model.h has obj file loading code, model drawing code using vertex buffer objects.
	playercycler.cpp/h uses model.h to define and render the bike (transforms, materials, etc.). Has control logic for smooth controls. Houses the shader selection controls based on the sticky key pressed.
	scene.cpp/h stores all information about scene objects and state (like keyboard presses and display lists).

	Linked with the SOIL library to load images.

cg_shaders's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.