#ifndef SHADER_BASE_SLANG #define SHADER_BASE_SLANG /* * I hope you are not looking at these war crimes. * They are truly horrible crimes. * Don't even try to understand what the fuck is happening here. */ #define DECLARE_TEXTURES(n) \ [[vk::binding(n)]] \ Sampler2D g_textures[]; \ float4 SampleTexture(uint32_t binding, float2 uv) { return g_textures[binding].Sample(uv); }; #define DECLARE_CBUFFER(b) [[vk::binding(b)]] cbuffer cbuffer_##b #define DECLARE_DATA(b, r) [[vk::binding(b)]] r #define DECLARE_CONSTANTS [[vk::push_constant]] cbuffer cbuffer_constants #define FIX_VERTEX_POSITION(x) #endif