Code Name: CheckerboardGenerator
In this example, a checkerboard texture is first generated with a compute shader and then applied to the spheres in the scene. The user can also specify the size and tile size of the texture to be generated.
| Input | Action |
|---|---|
| W/A/S/D | Move the camera |
| Mouse | Look around with the camera |
| Esc | Close the window |
| Parameter / Key | Type | Usage in Code | Description | Default Value |
|---|---|---|---|---|
| AppSettings.ClearColor | VkClearColorValue | AppSettings::ClearColor | Background color of the screen | |
| AppSettings.MouseSensitivity | float | AppSettings::MouseSensitivity | Mouse sensitivity value | |
| AppSettings.CameraSpeed | float | AppSettings::CameraSpeed | Speed of the camera | |
| AppSettings.CheckerboardTextureSize | std::uint32_t | AppSettings::CheckerboardTextureSize | Width and height value of the generated texture | |
| AppSettings.TileSize | int | AppSettings::TileSize | Tile size of the checkerboard texture |
- Creating a texture from compute shader
- Placing generated texture to the objects
| Shader Type | Status | Notes |
|---|---|---|
| GLSL | ✅ | |
| HLSL | ✅ | |
| Slang | ✅ |
None
Window system-dependent extensions:
- VK_KHR_surface
- VK_KHR_win32_surface (Windows)
- VK_KHR_swapchain
