Skip to content

mdhvg/shaders

Repository files navigation

Shaders

This repository contains a collection shader programs I made as a fun practice :)

Programs list

Falling Sand simulation

Learnt from this video by @Yusef28 and this paper

Run cmake -DPROGRAMS=sand .. to build

falling sand preview

Raytracer

Learnt from this video by @GetIntoGameDev.

Run cmake -DPROGRAMS=raytracer .. to build

raytracer preview

Ordered Dithering (or Bayer Dithering)

Learnt (more like copied) from this video by @Acerola.

Run cmake -DPROGRAMS=dither .. to build

Dithering preview

A random cute cat image from internet :>

Building Instructions

  • Recursively clone this repo
git clone --recursive https://github.com/mdhvg/shaders
cd shaders
  • Create build directory
mkdir build
cd build

Linux/MacOS (Mac not tested)

  • Build a specific program
cmake -DPROGRAMS=prog1;prog2 ..
make -j4
  • Or simply build all programs
cmake -DPROGRAMS=all ..
make -j4
cmake ..
make -j4

Windows

Requirements: MinGW-w64, Ninja

  • Build a specific program
cmake -G "Ninja" -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DPROGRAMS=prog1;prog2 -B . -S ..
ninja
  • Build all programs
cmake -G "Ninja" -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -B . -S ..
ninja

About

Shader programs with openGL I made for fun

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages