Posts

Procedural Terrain

Image
 PROCEDURAL TERRAIN   In this blog post I will be talking about my third homework of Ceng469 Computer Graphics II . In this homework we were asked to write a program in C++ using OpenGL graphics API that generates a random terrain on the fly using Perlin noise and geometry shaders which we can wander around like we are in a car. BEFORE STARTING Geometry Shaders For those who don't know  geometry shader is an optional but very powerful shader that comes after tesselation shaders (if no tesselation shaders are used then it comes after the vertex shader) and before the rasterization stages. It is a again about processing vertex data and primitives.  Unlike vertex shader geometry shaders have acces to all data of a primitive and the data passes by the  vertex shader. This means that instead of dealing with only one vertex at a time we can inspect the attributes of the whole triangle or line which allows us to compute triangle normals or other important data in real...