Create/Update assets for version 1.11

This commit is contained in:
InventiveBot
2017-02-18 11:52:42 +00:00
parent edd2521bab
commit 9b6bc1b90f
4698 changed files with 297322 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#version 120
uniform sampler2D DiffuseSampler;
varying vec2 texCoord;
varying vec2 oneTexel;
uniform vec2 InSize;
uniform vec2 BlurDir;
uniform float Radius;
void main() {
vec4 blurred = vec4(0.0);
float totalStrength = 0.0;
float totalAlpha = 0.0;
float totalSamples = 0.0;
for(float r = -Radius; r <= Radius; r += 1.0) {
vec4 sample = texture2D(DiffuseSampler, texCoord + oneTexel * r * BlurDir);
// Accumulate average alpha
totalAlpha = totalAlpha + sample.a;
totalSamples = totalSamples + 1.0;
// Accumulate smoothed blur
float strength = 1.0 - abs(r / Radius);
totalStrength = totalStrength + strength;
blurred = blurred + sample;
}
gl_FragColor = vec4(blurred.rgb / (Radius * 2.0 + 1.0), totalAlpha);
}