Skip to content

Commit

Permalink
[Lighting] Set intensity to 1.0 since the color from the atmospheric …
Browse files Browse the repository at this point in the history
…scattering already has the intensity encoded into it
  • Loading branch information
PanosK92 committed Nov 20, 2023
1 parent efa98d3 commit 4f8db59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data/shaders/common_structs.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ struct Light
if (light_is_directional())
{
float2 uv = direction_sphere_uv(-forward);
uint mip_level = 8; // sample higher mip to capture more light along that direction
uint mip_level = 5; // sample higher mip to capture more light along that direction
color = tex_environment.SampleLevel(samplers[sampler_trilinear_clamp], uv, mip_level).rgb;
intensity = luminance(color) * 10.0f;
intensity = 1.0f;
}

// apply occlusion
Expand Down
2 changes: 1 addition & 1 deletion runtime/Rendering/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ namespace Spartan
// options
m_options.clear();
SetOption(Renderer_Option::Hdr, swap_chain->IsHdr() ? 1.0f : 0.0f); // hdr is enabled by default if the swapchain is hdr
SetOption(Renderer_Option::Bloom, 0.05f); // non-zero values activate it and define the blend factor
SetOption(Renderer_Option::Bloom, 0.03f); // non-zero values activate it and define the blend factor
SetOption(Renderer_Option::MotionBlur, 1.0f);
SetOption(Renderer_Option::ScreenSpaceGlobalIllumination, 1.0f);
SetOption(Renderer_Option::ScreenSpaceShadows, static_cast<float>(Renderer_ScreenspaceShadow::Bend));
Expand Down

0 comments on commit 4f8db59

Please sign in to comment.