Skip to content

Instantly share code, notes, and snippets.

@gkaerts
gkaerts / bindless.hlsl
Last active August 12, 2023 15:19
Vulkan and D3D12 typed bindless resources in one shader-side API
// This file should be compiled with DXC against shader model 6.6
// Change the TARGET_API define here to either D3D or VK and switch compiler output formats (DXIL or SPIR-V) to match
#define D3D 1
#define VK 2
#define TARGET_API D3D
// Begin macro magic
#if TARGET_API == D3D
// No special root signature needed!