Surface Rendering with Bezier Surfaces
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_W2Ej5GVfTbYdg24emLRLY8CdNCzGjFJzqE0HdMgnY6QhssAxWidnRNyKDsFo7YKRWGYK3jhYGQAVYSNsfiIY7JET9M88vYQDj1VkPpgzHKDguRzY2WAm32OHgOKdg5Lxz0_iZSnpCsXOV1Y0GC3amb5xxiEpkhkTFg2tOR-k6LKKE_FDFhYbV8PydA/s320/Screen%20Shot%202023-04-05%20at%2019.23.06.png)
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...