Created
March 19, 2015 17:56
-
-
Save adrian-afl/4dbc13da13ff1e19a9d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec3 blurWhitening(){ | |
vec3 outc = vec3(0); | |
for(float g = 0; g < mPI2; g+=0.6){ | |
for(float g2 = 0; g2 < 14.0; g2+=2.0){ | |
vec2 gauss = vec2(sin(g)*ratio, cos(g)) * (g2 * 0.001); | |
vec3 color = fetchColor(UV + gauss); | |
float luminance = length(color); // luminance from 1.4 to 1.7320 | |
if(luminance > 1.0){ | |
luminance = (luminance - 1.0) / 0.320; | |
outc += 0.042857142 * luminance; | |
} | |
} | |
} | |
return outc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment