Ray Tracing in one weekend
OpenGL
OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.
Transformation
Implement three transformations: geometrical, viewing, and projection, on 3D models.
- Model Selection.
- Projection Transformations.
- Geometric Transformations.
- Viewing Transformations
- Show Informations
Lighting
Implement three light sources: directional, positional, and spot light, in both per-vertex and per-pixel lighting.
- Model Selection.
- Geometric Transformations.
- Lighting.
Texture Mapping
Render the 3D models with given textures.
- Nearest.
- Linear.
- Linear-mipmap-linear.
- Mirror
- Repeat
Cubic Bezier Patch
A set of 16 control points.
- Using tessellation shader to produce a triangle mesh which approximates the input Bezier Patch .
- The accuracy of the triangle mesh can be controlled by proper parameters.
Robot
- Design and render an animated robot with OpenGL
- Hierarchy Diagram.
- Hierarchy Matrix.
Buffer & Texture
- Generate buffer to pass the data into GPU.
- TellOpenGLwhichsampler2Dinglslmatch GL_TEXTURE0 or GL_TEXTURE1.
FrameBuffer Processing
- Bind FBO.
- Clear Framebuffer.
- Draw object.
- Bind default FBO.
- Clear Framebuffer.
- Use FBO texture & draw screen