hi these day i am stumbling with resource binding problem on directx 11. what i want to do is to write new color info into the back buffer.

so as you can check the code below.

with my intuition, i just simply copy 'outputTex' resource into back buffer. and, it is not doing anything. and i already checked outputTex has the right value in it. so it seems that i can't use CopyResource().

    Microsoft::WRL::ComPtr<ID3D11Texture2D> backBuffer;
    swapchain->GetBuffer(0, __uuidof(ID3D11Texture2D), reinterpret_cast<void**>(backBuffer.GetAddressOf()));

    dContext->CopyResource(backBuffer.Get(), outputTex.Get());

so for alternative, i managed to just pass the 'outputTex' resource to Pixel shader instead of dealing with back buffer.

    dContext->PSSetShaderResources(0, 1, outputSRV.GetAddressOf());

and this is still not working as well.

i hope this is just my silly mistake.

0 Answers