1uniform Buffer <float4> g_tTexbf4_test : register(t0); 2 3Buffer g_tTexbf4; // default is float4 4Buffer <int4> g_tTexbi4; 5Buffer <uint4> g_tTexbu4; 6 7struct PS_OUTPUT 8{ 9 float4 Color : SV_Target0; 10 float Depth : SV_Depth; 11}; 12 13uniform int c1; 14uniform int2 c2; 15uniform int3 c3; 16uniform int4 c4; 17 18uniform int o1; 19uniform int2 o2; 20uniform int3 o3; 21uniform int4 o4; 22 23PS_OUTPUT main() 24{ 25 PS_OUTPUT psout; 26 27 // Buffer 28 float4 r00 = g_tTexbf4.Load(c1); 29 int4 r01 = g_tTexbi4.Load(c1); 30 uint4 r02 = g_tTexbu4.Load(c1); 31 32 // TODO: other types that can be put in sampler buffers, like float2x2, and float3. 33 34 psout.Color = 1.0; 35 psout.Depth = 1.0; 36 37 return psout; 38} 39