Skip to content

2D Raycaster Engine Implemented Using Compute Shaders

Notifications You must be signed in to change notification settings

berkbavas/RaycasterEngine

Repository files navigation

2D Raycaster Engine

Traditional 2D raycaster engines run on the CPU, so they have a bottleneck when loading screen textures from the CPU to the GPU for each frame. This raycaster engine is implemented using compute shaders, allowing it to avoid this bottleneck since it runs on the GPU.

Textures belong to Wolfenstein 3D.

Raycaster codes are taken from Lode Vandevenne's tutorials and adopted.

Build

  1. Install CMake 3.25.1 or above.
  2. Install Visual Studio 2022 and MSVC C++ v143 Compiler.
  3. Install Qt 6.7.3 MSVC2022 64bit kit.
  4. Set environment variable Qt6_DIR as C:\Qt\6.7.3\msvc2022_64.
  5. Clone the repo git clone https://github.com/berkbavas/RaycasterEngine.git.
  6. Create a folder mkdir Build.
  7. Enter the folder cd Build.
  8. Run CMake cmake ...
  9. Open RaycasterEngine.sln with Visual Studio 2022.
  10. Build with Release config.

Screenshot

Screenshot_00

Keywords

2D Raycaster, 2D Rendering, Compute Shaders, OpenGL, GLSL, Wolfenstein 3D.