I was trying to use a texture as a variable in my shader (DX11 VS/PS 5.0). Can't get it. I have recently find this piece of code here where a texture is passed as a function parameter. Is that compatible with DX11 VS/PS 5.0 and can I transform this to have in a ps shader a texture as variable that I can modify on demand in a loop (for or while).
kernel void kernel_createHiZ(texture2d<float, access::read> depth [[ texture(0) ]],
texture2d<float, access::write> outDepth [[ texture(1) ]],
uint2 tid [[thread_position_in_grid]])