Skip to content

Commit

Permalink
[lighting] the sky velocity is now computed, this way FSR/TAA no long…
Browse files Browse the repository at this point in the history
…er blurs the sky during camera movement
  • Loading branch information
PanosK92 committed Oct 28, 2024
1 parent a25edd4 commit 887f1af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/shaders/skysphere.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ struct space
const float EXPOSURE = 1000000.0f;
const float FLICKER_SPEED = 0.2f;

float stars_noise_base = noise(view_direction * SCALE);
float stars_noise = pow(saturate(stars_noise_base), PROBABILITY) * EXPOSURE;
stars_noise * = lerp(0.5, 1.5, noise(mad(view_direction, SCALE * 0.5f, time * FLICKER_SPEED)));
float stars_noise_base = noise(view_direction * SCALE);
float stars_noise = pow(saturate(stars_noise_base), PROBABILITY) * EXPOSURE;
stars_noise *= lerp(0.5, 1.5, noise(mad(view_direction, SCALE * 0.5f, time * FLICKER_SPEED)));

float atmos_luminance = dot(atmosphere_color, float3(0.299, 0.587, 0.114));
float intensity = saturate(0.05f - atmos_luminance);
Expand Down
1 change: 1 addition & 0 deletions runtime/Rendering/Renderer_Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,7 @@ namespace Spartan
SetGbufferTextures(cmd_list);
cmd_list->SetTexture(Renderer_BindingsUav::tex, tex_out);
cmd_list->SetTexture(Renderer_BindingsUav::tex2, GetRenderTarget(Renderer_RenderTarget::gbuffer_color));
cmd_list->SetTexture(Renderer_BindingsUav::tex3, GetRenderTarget(Renderer_RenderTarget::gbuffer_velocity));
cmd_list->SetTexture(Renderer_BindingsSrv::tex, GetStandardTexture(Renderer_StandardTexture::Foam));
cmd_list->SetTexture(Renderer_BindingsSrv::light_diffuse, GetRenderTarget(Renderer_RenderTarget::light_diffuse));
cmd_list->SetTexture(Renderer_BindingsSrv::light_specular, GetRenderTarget(Renderer_RenderTarget::light_specular));
Expand Down

0 comments on commit 887f1af

Please sign in to comment.