An open API service indexing awesome lists of open source software.

https://github.com/Hopson97/Compute-Shader-Testing

Compute shader OpenGL experiments
https://github.com/Hopson97/Compute-Shader-Testing

Last synced: about 1 year ago
JSON representation

Compute shader OpenGL experiments

Awesome Lists containing this project

README

          

# Compute Shaders

Compute shader testing for learning.

Video: https://www.youtube.com/watch?v=p5Iev026dCY&list=RDp5Iev026dCY&start_radio=1

## Building and Running

### Windows (Visual Studio)

The easiest way to build is to use [vcpkg](https://vcpkg.io/en/index.html) and install dependencies through this:

```bash
vcpkg install sfml
vcpkg install imgui
vcpkg install glm
vcpkg integrate install
```

Then open the Visual Studio project file to build and run.

### Linux

#### Pre-requisites

Install Vcpkg and other required packages using your distribution's package manager:

```sh
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh

# These are required to build some packages
sudo apt install cmake make autoconf libtool pkg-config

# The following are required for SFML
sudo apt install libx11-dev xorg-dev freeglut3-dev libudev-dev
```

Ensure paths are set correctly:

```sh
export VCPKG_ROOT=/path/to/vcpkg
export PATH=$VCPKG_ROOT:$PATH
```

RECOMMENDED: Add the above lines to your `.bashrc` or `.zshrc` file:

```sh
echo 'export VCPKG_ROOT=/path/to/vcpkg' >> ~/.bashrc
echo 'export PATH=$VCPKG_ROOT:$PATH' >> ~/.bashrc
```

#### Build and Run

To build, at the root of the project:

```sh
vcpkg install # First time only
sh scripts/build.sh
```

To run, at the root of the project:

```sh
sh scripts/run.sh
```

To build and run in release mode, simply add the `release` suffix:

```sh
sh scripts/build.sh release
sh scripts/run.sh release
```

## Video

https://www.youtube.com/watch?v=YiFvHH5bDAE

## Resources

https://antongerdelan.net/opengl/compute.html

https://www.khronos.org/opengl/wiki/Image_Load_Store

https://raytracing.github.io/books/RayTracingInOneWeekend.html

https://www.youtube.com/watch?v=nF4X9BIUzx0