Skip to content

Commit

Permalink
VR (D3D12): Fix texture RTV not getting cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed May 27, 2024
1 parent 9513c14 commit a08b246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mods/vr/D3D12Component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ vr::EVRCompositorError D3D12Component::on_frame(VR* vr) {
commands.copy(backbuffer.Get(), m_backbuffer_copy.texture.Get(), D3D12_RESOURCE_STATE_PRESENT, D3D12_RESOURCE_STATE_PRESENT);

float clear_color[4]{0.0f, 0.0f, 0.0f, 0.0f};
m_backbuffer_copy.commands.clear_rtv(m_converted_eye_tex, clear_color, D3D12_RESOURCE_STATE_PRESENT);
commands.clear_rtv(m_converted_eye_tex, clear_color, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);

// Convert the backbuffer to 8-bit.
render_srv_to_rtv(command_list, m_backbuffer_copy, m_converted_eye_tex, D3D12_RESOURCE_STATE_PRESENT, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
Expand Down

0 comments on commit a08b246

Please sign in to comment.