summaryrefslogtreecommitdiff
path: root/shaders/humus-hdr/10.shader_test
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/humus-hdr/10.shader_test')
-rw-r--r--shaders/humus-hdr/10.shader_test63
1 files changed, 63 insertions, 0 deletions
diff --git a/shaders/humus-hdr/10.shader_test b/shaders/humus-hdr/10.shader_test
new file mode 100644
index 0000000..9a007e9
--- /dev/null
+++ b/shaders/humus-hdr/10.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.10
+
+[fragment shader]
+#version 130
+#define saturate(x) clamp(x,0.0,1.0)
+#define lerp mix
+
+varying vec2 texCoord0;
+varying vec2 texCoord1;
+varying vec2 texCoord2;
+varying vec2 texCoord3;
+
+
+#line 24
+uniform sampler2D Image;
+
+void main(){
+ vec3 base = texture2D(Image, texCoord0).rgb;
+ base += texture2D(Image, texCoord1).rgb;
+ base += texture2D(Image, texCoord2).rgb;
+ base += texture2D(Image, texCoord3).rgb;
+
+ gl_FragColor.rgb = 0.25 * base.rgb;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+[vertex shader]
+#version 130
+#define saturate(x) clamp(x,0.0,1.0)
+#define lerp mix
+
+varying vec2 texCoord0;
+varying vec2 texCoord1;
+varying vec2 texCoord2;
+varying vec2 texCoord3;
+
+
+#line 9
+uniform vec2 sample0, sample1, sample2, sample3;
+
+void main(){
+ gl_Position = gl_Vertex;
+
+ vec2 texCoord = gl_Vertex.xy * 0.5 + 0.5;
+ texCoord0 = texCoord + sample0;
+ texCoord1 = texCoord + sample1;
+ texCoord2 = texCoord + sample2;
+ texCoord3 = texCoord + sample3;
+}
+
+
+