Untitled
unknown
plain_text
a year ago
865 B
10
Indexable
float Pi = 6.28318530718; // Pi*2
// GAUSSIAN BLUR SETTINGS {{{
float Directions = 16.0; // BLUR DIRECTIONS (Default 16.0 - More is better but slower)
float Quality = 3.0; // BLUR QUALITY (Default 4.0 - More is better but slower)
float Size = 64.0; // BLUR SIZE (Radius)
// GAUSSIAN BLUR SETTINGS }}}
vec2 Radius = Size/iResolution.xy;
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = fragCoord/iResolution.xy;
// Pixel colour
vec4 Color = texture(iChannel0, uv);
// Blur calculations
for( float d=0.0; d<Pi; d+=Pi/Directions)
{
for(float i=1.0/Quality; i<=1.0; i+=1.0/Quality)
{
Color += texture( iChannel0, uv+vec2(cos(d),sin(d))Radiusi);
}
}
// Output to screen
Color /= Quality * Directions - 15.0;
fragColor = Color;Editor is loading...
Leave a Comment