Hi all,
Below is my code:
RWTexture2D<float> tex1 : register(u0);
RWTexture2D<float2> tex2: register(u1);
[numthreads(16, 16, 1)]
void main( uint3 DTid : SV_DispatchThreadID )
{
float a;
float2 b;
a = tex1[DTid.xy]; //OK
b = tex2[DTid.xy]; //Error
}
HLSL compiler returns an error "typed UAV loads are only allowed for single-component 32-bit element types".
Does anyone know how to read data from RWTexture2D<float2> in compute shader v5.0?