Posts

DEFERRED RENDERING IN OPENGL

Image
 In this blog post I will go over my implementation for my CENG469 COMPUTER GRAPHICS II term project. G-buffer visualization Initial Goal Starting my project, I had set the following goals: Implement deferred rendering in OpenGL using a complex scene Compare deferred rendering results with forward rendering (FPS comparison) Different to previous assignments, I implemented this program using Modern OpenGL, since it is more compatible with MacOS. Deferred Rendering Implementation Process 1. Creating the G-buffer The first step in my project was to set up the G-buffer successfully so that I could safely proceed with the deferred rendering pipeline implementation. I planned to have the following textures to record geometry information of the scene: gPosition: Stores the fragment positions gNormal: Stores normal information of each fragment gAlbedoSpec: Stores the diffuse and specular color information of fragments gTexDepth: Stores the depth value of fragments (copied from depth buffer...

Grass Rendering in OpenGL with Geometry Shader and Bezier Curves

Image
In this blog post I will go over my implementation for the third homework task of CENG469 which is Grass Rendering in OpenGL (Geometry Shader, Bezier Curves, Perlin Noise). Due to time constraints, I could only implement a sort of setup and test scene for this assignment, which is not aesthetically pleasing but contains some basic concept implementations such as bezier curve generation with a geometry shader. Initial Scene Setup and Grass Point Generation I have used my previous OpenGL project as the base for this project to utilize the existing camera control mechanisms. Unfortunately there is some amount of unnecessary code left over from the previous project. However, I have implemented all the necessary implementations for grass rendering from scratch. For the ground where the grass would grow out of, I rendered a brown horizontal quad. I tweaked with an existing cube obj file and left only the face information of the top cube face for this purpose (a lazy solution because I wa...

Environment Mapping in OpenGL

Image
In this blog post I will go over my implementation for the second homework of CENG469 Computer Graphics II. Initial Goal vs. Progress This assignment consisted of several different concepts: E quirectangular to cubemap texture generation Environment mapping (Skybox creation, reflection and refraction) Image based lighting (Median Cut Sampling) HDR tonemapping Unfortunately, due to my slow progress and the time constraints, I wasn't able to accomplish the image based lighting and tonemapping steps which is the heart of the task. However, I believe I've improved my knowledge on some important OpenGL concepts that needed improving such as VBO generation, texture generation and utilizing shader programs. I have also learned new concepts, which include the usage and generation of HDRI textures and skybox generation. Equirectangular to cubemap texture generation The first step of my implementation was to take a spherical HDR image and accurately produce 6 cubemap faces from it that w...