summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-12-08Ian says I'm supposed to use 'n' and 'v' in the Fresnel calculation.HEADmasterKenneth Graunke1-3/+3
2010-12-08Fix up the lighting/environment combining - use mix().Kenneth Graunke1-6/+3
2010-12-08Use GL_LINEAR instead of GL_NEAREST for the texture filtering.Kenneth Graunke1-2/+2
2010-12-08Make "eye" a uniform rather than an attribute.Kenneth Graunke2-10/+6
Previously I declared it as an attribute and then tried to initialize it with a bogus glUniform4fv call. Amazingly, it didn't completely break.
2010-12-01Remove unnecessary glEnable call.Kenneth Graunke1-2/+0
Apparently this is only used for fixed function.
2010-11-17Small fragment shader changes.Kenneth Graunke1-2/+3
2010-11-17Combine the environment mapping and bump mapping via a Fresnel factor.Kenneth Graunke1-4/+24
2010-11-17Upgrade shaders to GLSL 1.20.Kenneth Graunke2-0/+2
Having to type 1.0 everywhere is really irritating.
2010-11-17Make the C1 camera the default.Kenneth Graunke1-1/+1
2010-11-17Add environment mapping.Kenneth Graunke3-2/+32
Still need to combine this with the bump mapping.
2010-11-17Load the cube texture at startup.Kenneth Graunke2-0/+37
2010-11-17Add cube map textures from Humus.Kenneth Graunke6-0/+0
Freely redistributable "Earth" textures downloaded from: http://www.humus.name/index.php?page=Textures&&start=64
2010-11-07Implement a procedular bump map.Kenneth Graunke2-4/+29
Based off the example shader in the Orange Book, 3rd ed., chapter 11.
2010-11-04Convert shaders to work in surface space rather than eye space.Kenneth Graunke2-19/+27
2010-10-27Add support code for loading textures from disk.Kenneth Graunke4-3/+293
Signed-off-by: Ian Romanick <idr@freedesktop.org>
2010-10-27Remove unused "color" variable from the phong fragment shader.Kenneth Graunke1-2/+0
2010-10-21Add comments.assignment-1Kenneth Graunke1-0/+3
2010-10-21Move initial control points to more sensible locations.Kenneth Graunke1-3/+3
With the original points, the straight line paths caused the camera to pass through the spheres. Signed-off-by: Ian Romanick <idr@freedesktop.org>
2010-10-21Calculate initial C0 curves based off of the original code points.Kenneth Graunke1-15/+21
Signed-off-by: Ian Romanick <idr@freedesktop.org> Signed-off-by: Kenneth Graunke <kenneth@freedesktop.org>
2010-10-21Refactor out the linear interpolation function (lerp).Kenneth Graunke1-1/+10
Instead of open-coding it.
2010-10-21Fix per-fragment lighting.Kenneth Graunke1-5/+5
The code in the slides uses vec3s, but the supplied shaders use vec4s. My implementation incorrectly included the 'w' component in the normalize call, which threw off the results. This patch is quite ugly; fixing the code to use vec3s would almost certainly be superior. Or at least factoring the .xyz into one place.
2010-10-21Implement G1 and C1 curve conversion.Kenneth Graunke1-7/+32
2010-10-21Add support for switching the camera.Kenneth Graunke1-35/+82
This allows the user to switch the camera between linear interpolation, unmodified C0 bezier curves, G1, and C1 curves. This also renames "G0" to "G1" in the code.
2010-10-20Implement the bezier position function.Kenneth Graunke1-2/+17
2010-10-20Implement phong shading.Kenneth Graunke2-9/+11
2010-10-06Initial commit. lolKenneth Graunke11-0/+963