Posts

Cubemaps and Reflections

Image
           Welcome to my second blogpost about our 2nd homework in Computer Graphics 2 class.     In this assignment we worked with static and dynamic cubemaps and reflections. Again I worked step by step and I will be sharing my process with you. Figure 0: HW2 final result First Step: Static Cubemap      Firstly, I wanted to show our environment correctly before going to other steps. This is done with static cubemapping. After creating a cubemap texture from the given 6 images, I put these textures on a cube object with [-1,1] dimensions to work correctly with texture coordinates. After putting my camera on (0,0,0) position, I was able to see my environment.  Figure 1: Static cubemap result Second Step: Ground Texture      After showing environment, I wanted to show the ground. I used the ground object that was given to me. But in addition I assigned it texture coordinates given below, to create a repeated textu...

Surface Rendering with Bezier Surfaces

Image
Welcome to my first blog post which will be about our first assignment in CENG469.      In this assignment we were asked render the surface whose information was given in the input with ambient lighting and diffuse and specular shading effects of the given point lights. We also needed to be able to change the sample size, rotation angle and coordinates of this surface according to user interaction. First step: Render a flat surface      Firstly, I wanted to be able render a flat surface without any height component on the XY plane. First step was parsing the input and calculating how many vertical and horizontal bezier surfaces there are. Instead of sending all of the vertices to vertex shader at once, I have created sampleSize x sampleSize vertex buffer and created its index array buffer. Then for every bezier surface, I sent this buffer to vertex shader with the horizontal and vertical Bezier surface counts and the surface’s index. Using these data, verte...