Skip to content

Commit a76f803

Browse files
committed
[renderer] toned down bloom and fixed a bug where the gt7 tonemapper wouldn't enable in sdr
1 parent 4f0c3d2 commit a76f803

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

data/shaders/bloom.hlsl

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,11 @@ void main_cs(uint3 thread_id : SV_DispatchThreadID)
201201
if (any(int2(thread_id.xy) >= resolution_out))
202202
return;
203203

204-
float4 color_frame = tex[thread_id.xy];
205-
float4 color_bloom = tex2[thread_id.xy];
206-
207-
// correction factor
208-
// brings the accumulated energy down to a normalized range
209-
// allowing you to pass 1.0 from the engine
210-
const float INTENSITY_CORRECTION = 0.001f;
211-
212-
float bloom_intensity = pass_get_f3_value().x;
213-
float3 result = color_frame.rgb + (color_bloom.rgb * INTENSITY_CORRECTION * bloom_intensity);
204+
float4 color_frame = tex[thread_id.xy];
205+
float4 color_bloom = tex2[thread_id.xy];
206+
const float INTENSITY_CORRECTION = 0.0005f;
207+
float bloom_intensity = pass_get_f3_value().x;
208+
float3 result = color_frame.rgb + (color_bloom.rgb * INTENSITY_CORRECTION * bloom_intensity);
214209

215210
tex_uav[thread_id.xy] = float4(result, color_frame.a);
216211
}

source/runtime/Rendering/Renderer.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,6 @@ namespace spartan
214214
SetOption(Renderer_Option::Hdr, swapchain->IsHdr() ? 1.0f : 0.0f);
215215
}
216216

217-
// tonemapping
218-
if (!swapchain->IsHdr())
219-
{
220-
SetOption(Renderer_Option::Tonemapping, static_cast<float>(Renderer_Tonemapping::AcesNautilus));
221-
}
222-
223217
// load/create resources
224218
{
225219
// reduce startup time by doing expensive operations in another thread

0 commit comments

Comments
 (0)