From 27acaee3a9d876bfdc16338bd3731154fe94a48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bj=C3=B8rn=20Greve?= Date: Sat, 24 Feb 2024 20:14:31 +0800 Subject: [PATCH] Reduced sky brightness --- SourceFiles/SkyPixelShader.h | 6 +++--- SourceFiles/SkyPixelShader.hlsl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SourceFiles/SkyPixelShader.h b/SourceFiles/SkyPixelShader.h index 0b67b1d..2a8099d 100644 --- a/SourceFiles/SkyPixelShader.h +++ b/SourceFiles/SkyPixelShader.h @@ -99,7 +99,7 @@ float4 main(PixelInputType input) : SV_TARGET if (use_sky_background) { float4 sampledTextureColor = shaderTextures[0].Sample(ss, input.tex_coords0); - final_color.rgb = sampledTextureColor.rgb * 1.4; + final_color.rgb = sampledTextureColor.rgb * 1.1; } if (use_clouds_0) @@ -108,7 +108,7 @@ float4 main(PixelInputType input) : SV_TARGET float v = input.tex_coords0.y; float4 sampledTextureColor = shaderTextures[1].Sample(ss, float2(u, v)); - final_color.rgb += sampledTextureColor.rgb * sampledTextureColor.a; + final_color.rgb += saturate(sampledTextureColor.rgb) * sampledTextureColor.a; } if (use_clouds_1) @@ -117,7 +117,7 @@ float4 main(PixelInputType input) : SV_TARGET float v = input.tex_coords0.y; float4 sampledTextureColor = shaderTextures[2].Sample(ss, float2(u, v)); - final_color.rgb += sampledTextureColor.rgb * sampledTextureColor.a; + final_color.rgb += saturate(sampledTextureColor.rgb) * sampledTextureColor.a; } //if (use_sun) diff --git a/SourceFiles/SkyPixelShader.hlsl b/SourceFiles/SkyPixelShader.hlsl index 05082df..eafcc9c 100644 --- a/SourceFiles/SkyPixelShader.hlsl +++ b/SourceFiles/SkyPixelShader.hlsl @@ -94,7 +94,7 @@ float4 main(PixelInputType input) : SV_TARGET if (use_sky_background) { float4 sampledTextureColor = shaderTextures[0].Sample(ss, input.tex_coords0); - final_color.rgb = sampledTextureColor.rgb * 1.4; + final_color.rgb = sampledTextureColor.rgb * 1.1; } if (use_clouds_0) @@ -103,7 +103,7 @@ float4 main(PixelInputType input) : SV_TARGET float v = input.tex_coords0.y; float4 sampledTextureColor = shaderTextures[1].Sample(ss, float2(u, v)); - final_color.rgb += sampledTextureColor.rgb * sampledTextureColor.a; + final_color.rgb += saturate(sampledTextureColor.rgb) * sampledTextureColor.a; } if (use_clouds_1) @@ -112,7 +112,7 @@ float4 main(PixelInputType input) : SV_TARGET float v = input.tex_coords0.y; float4 sampledTextureColor = shaderTextures[2].Sample(ss, float2(u, v)); - final_color.rgb += sampledTextureColor.rgb * sampledTextureColor.a; + final_color.rgb += saturate(sampledTextureColor.rgb) * sampledTextureColor.a; } //if (use_sun)