Posts

Showing posts from June, 2024

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...