assets.minecraft.shaders.program.gaussian_blur.fsh Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of advancedfmk-uicompositor Show documentation
Show all versions of advancedfmk-uicompositor Show documentation
UI parser & renderer for Advanced Framework
The newest version!
#version 150
uniform sampler2D DiffuseSampler;
uniform sampler2D InputSampler;
uniform vec4 ColorModulate;
uniform int Radius;
uniform int DigType;
uniform float NoiseStrength;
in vec2 texCoord;
in vec2 oneTexel;
out vec4 fragColor;
#define PI2 6.2831853072
vec4 blur(int samples) {
vec4 O = vec4(0.0);
float r = float(samples)*0.5;
float sigma = r*0.5;
float f = 1./(6.28318530718*sigma*sigma);
int s2 = samples*samples;
for (int i = 0; i