From caf55fb8d1c787bc4b6ac413550df4ba5f6bd8f3 Mon Sep 17 00:00:00 2001 From: Tleety Date: Fri, 22 Jan 2016 10:52:45 +0100 Subject: [PATCH] Small fix to the bloom light, now feels smoother. --- resources/Shaders/ForwardPlus.frag.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/Shaders/ForwardPlus.frag.glsl b/resources/Shaders/ForwardPlus.frag.glsl index 421f130c..403c96fc 100644 --- a/resources/Shaders/ForwardPlus.frag.glsl +++ b/resources/Shaders/ForwardPlus.frag.glsl @@ -140,11 +140,13 @@ void main() sceneColor = vec4(color_result.xyz, 1.0); //These if statements should be removed if they are slow. color_result += glowTexel; + bloomColor = vec4(clamp(color_result.xyz - 1.0, 0, 100), 1.0); + /* if(color_result.x > 1 || color_result.y > 1 || color_result.z > 1) { bloomColor = vec4(color_result.xyz, 1.0); } else { bloomColor = vec4(0.0, 0.0, 0.0, 1.0); - } + } */ //sceneColor += Input.DiffuseColor * (totalLighting.Diffuse) * diffuseTexel * Color; //sceneColor += Input.DiffuseColor + vec4(0.0, LightGrids.Data[currentTile].Amount/3, 0, 1);