Skip to content
OpenGL playground
JavaScript GLSL C++ MATLAB HTML Makefile
Branch: master
Clone or download

README.md

opengLOL

Requirements

glew and glfw3, both availabe via homebrew:

$ brew install glew && brew install glfw3

Phong Shader

compile:

$ make phong

run:

$ ./phong.exe

new alt

Effervescent bubbles were built up in steps

Drawing

Shader #0 In which, we create a baby shader to test our development setup

Drawing Shader #1 In which, we test out gl_FragCoord

Drawing Shader #2 In which, we remember that we don't need gl_FragCoord and can just use the interpolated values from a drawn square.

Drawing Shader #3 In which, we expand our fictional world to include a sphere and a camera. If a ray emanating from the cemera through a pixel intersects the sphere, we draw that pixel in white.

Drawing Shader #4 In which, we compute the points at which a ray intersects the sphere, and then use that point to compute diffuse shading.

You can’t perform that action at this time.