#include "sh/common.hlsl" /* ========================== * * Root signature * ========================== */ #define ROOTSIG \ "RootConstants(num32BitConstants=16, b0), " \ "DescriptorTable(SRV(t0, numDescriptors = unbounded, flags = DESCRIPTORS_VOLATILE)), " \ "StaticSampler(s0, " \ "filter = FILTER_MIN_MAG_MIP_POINT, " \ "addressU = TEXTURE_ADDRESS_CLAMP, " \ "addressV = TEXTURE_ADDRESS_CLAMP, " \ "addressW = TEXTURE_ADDRESS_CLAMP, " \ "maxAnisotropy = 1)" ConstantBuffer g_constants : register(b0); Texture2D g_textures[] : register(t0); SamplerState g_sampler : register(s0); /* ========================== * * Compute shader * ========================== */ struct cs_input { DECLS(uint, SV_DispatchThreadID); }; [numthreads(32, 1, 1)] SH_ENTRY(ROOTSIG) void cs(struct cs_input input) { }