uniform mat4 projection_matrix;
+uniform sampler2D source;
uniform sampler2D depth;
uniform sampler2D occlusion;
uniform sampler2D rotate;
-import postprocess;
+import flat_effect;
import _ambientocclusion;
#pragma MSP stage(fragment)
+layout(location=0) out vec4 frag_color;
void main()
{
vec3 center = unproject(vec3(vertex.xy, texture(depth, texcoord).r));
-import postprocess;
+import flat_effect;
import _ambientocclusion;
#pragma MSP stage(fragment)
+layout(location=0) out float frag_out;
void main()
{
vec4 rv = texture(rotate, gl_FragCoord.xy/4.0)*2.0-1.0;
count += 1.0;
}
}
- frag_color = vec4(1.0-occlusion_sum/count, 0.0, 0.0, 1.0);
+ frag_out = 1.0-occlusion_sum/count;
}
+uniform sampler2D source;
uniform sampler2D blurred;
uniform vec2 delta;
uniform BloomParams
-import postprocess;
+import flat_effect;
import _bloom;
#pragma MSP stage(fragment)
+layout(location=0) out vec4 frag_color;
void main()
{
- frag_color = vec4(0.0, 0.0, 0.0, 0.0);
+ frag_color = vec4(0.0);
for(int i=0; i<=size*2; ++i)
frag_color += texture(source, texcoord+delta*float(i-size))*factors[i];
}
-import postprocess;
+import flat_effect;
import _bloom;
#pragma MSP stage(fragment)
+layout(location=0) out vec4 frag_color;
void main()
{
frag_color = mix(texture(source, texcoord), texture(blurred, texcoord), strength);
-import postprocess;
+import flat_effect;
-uniform sampler1D curve;
uniform ToneMapping
{
float exposure;
vec3 brightness_response;
};
+uniform sampler2D source;
+uniform sampler1D curve;
+
#pragma MSP stage(fragment)
+layout(location=0) out vec4 frag_color;
void main()
{
vec4 incoming = texture(source, texcoord);
--- /dev/null
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 vertex;
+void main()
+{
+ gl_Position = vertex;
+ out vec2 texcoord = vertex.xy*0.5+0.5;
+ passthrough;
+}
+++ /dev/null
-uniform sampler2D source;
-
-#pragma MSP stage(vertex)
-layout(location=0) in vec4 vertex;
-void main()
-{
- gl_Position = vertex;
- out vec2 texcoord = vertex.xy*0.5+0.5;
- passthrough;
-}
-
-#pragma MSP stage(fragment)
-layout(location=0) out vec4 frag_color;