This project was created for learnig purposes. It uses compute shaders to generate random terrain and tesselation shader to render it in high resolution.
W
A
S
D
to move along x/z axis.
SPACE
LCTRL
to move along y axis.
LSHIFT
to move faster.
MOUSE
to look around.
R
to generate new random terrain.
F
to render in wireframe mode.
H
To switch between "rendering in high quality" and "optimized rendering".
ESC
to exit.
Terrain is generated in compute shaders for efficiency. 3 textures are used to describe the terrain. Firstly height map is generated from perlin noise, than normal and diffuse maps are generated from height map.
If optimize rendering is allowed terrain closer to the camera will be more tesselated than terrain further away.
Normal mode | Wireframe mode |
---|---|
For realistic lighting normal maps are used. Below you may see the difference between rendering with normal maps (on the left) and without them (on the right).
Run premake.exe vs2022
to generate Visual Studio 2022 solution.
Used libraries
- glad- glfw
- glm