Skip to content

Commit

Permalink
Add missing initial clear
Browse files Browse the repository at this point in the history
  • Loading branch information
sergcpp committed May 30, 2024
1 parent 27c9f87 commit 0e06843
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/SceneGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -1613,6 +1613,12 @@ inline std::vector<Ray::color_rgba8_t> Ray::NS::Scene::CalcSkyEnvTexture(const a
{ // Write sky image
CommandBuffer cmd_buf = BegSingleTimeCommands(ctx_->api(), ctx_->device(), ctx_->temp_command_pool());

const TransitionInfo res_transition = {&temp_img_, eResState::CopyDst};
TransitionResourceStates(cmd_buf, AllStages, AllStages, {&res_transition, 1});

static const float rgba[4] = {};
ClearColorImage(temp_img_, rgba, cmd_buf);

const TransitionInfo res_transitions[] = {{&atmosphere_params_buf_, eResState::UniformBuffer},
{&sky_transmittance_lut_tex_, eResState::ShaderResource},
{&sky_multiscatter_lut_tex_, eResState::ShaderResource},
Expand Down

0 comments on commit 0e06843

Please sign in to comment.