diff options
Diffstat (limited to 'shaders/humus-hdr/5.frag')
-rw-r--r-- | shaders/humus-hdr/5.frag | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/shaders/humus-hdr/5.frag b/shaders/humus-hdr/5.frag new file mode 100644 index 0000000..9418882 --- /dev/null +++ b/shaders/humus-hdr/5.frag @@ -0,0 +1,28 @@ +#version 120 +#define saturate(x) clamp(x,0.0,1.0) +#define lerp mix +
+varying vec2 texCoord;
+
+
+#line 15 +uniform sampler2D Base;
+uniform sampler2D Blur;
+
+uniform float exposure;
+uniform float range;
+uniform float blurStrength;
+
+void main(){
+ vec4 base = texture2D(Base, texCoord);
+ vec4 blur = texture2D(Blur, texCoord);
+
+ blur.rgb = pow(blur.rgb, vec3(blurStrength));
+
+ blur *= range;
+
+ vec4 color = base + blur;
+
+ gl_FragColor.rgb = 1.0 - exp(-exposure * color.rgb);
+}
+ |