A minimal Vulkan VK_KHR_fragment_shader_barycentric triangle example
  • C 93.7%
  • GLSL 3.2%
  • CMake 3.1%
Find a file
2026-05-01 17:10:44 +02:00
.gitignore Initial commit 2024-11-10 10:02:22 +01:00
CMakeLists.txt Initial commit 2024-11-10 10:10:33 +01:00
LICENSE Initial commit 2024-11-10 10:10:33 +01:00
README.md Add primary repository notice to README 2026-05-01 17:10:44 +02:00
screenshot.png Added screenshot 2024-11-10 10:13:47 +01:00
triangle.frag.glsl Initial commit 2024-11-10 10:10:33 +01:00
triangle.vert.glsl Initial commit 2024-11-10 10:10:33 +01:00
vulkanbarycentrictest.c Updated comment 2024-11-10 10:26:41 +01:00

Important

The primary repository has moved to git.rosseaux.net/BeRo1985/vulkanbarycentrictest. This GitHub repository is kept up-to-date via push mirroring.

Description

A minimal Vulkan VK_KHR_fragment_shader_barycentric triangle example, which demonstrates the use of the barycentric coordinates in the fragment shader.

Prerequisites

  • Vulkan SDK
  • SDL2
  • CMake
  • C compiler

Build (Linux)

$ cmake .
$ make

Run (Linux)

$ ./vulkanbarycentrictest

Build (Windows)

$ cmake -G "Visual Studio 17 2022 Win64" .

Open the generated Visual Studio solution and build it.

Run (Windows)

Open a command prompt and run the executable.

Screenshot

screenshot

License

zlib see LICENSE file