diff options
| author | Ray <[email protected]> | 2017-04-09 23:46:47 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2017-04-09 23:46:47 +0200 |
| commit | f7bebf9861734c47d0840868f243b186a59a96ba (patch) | |
| tree | f5ca2d320c680ef5926b5455e4498646031cd5ac /docs/examples/web/resources/shaders/glsl330/bloom.fs | |
| parent | 8374460c3986b16c68a6dea0643e9af541987d52 (diff) | |
| download | raylib-f7bebf9861734c47d0840868f243b186a59a96ba.tar.gz raylib-f7bebf9861734c47d0840868f243b186a59a96ba.zip | |
Working on web examples
Reorganizing folders
Review examples
Work on makefile and loader.html
Diffstat (limited to 'docs/examples/web/resources/shaders/glsl330/bloom.fs')
| -rw-r--r-- | docs/examples/web/resources/shaders/glsl330/bloom.fs | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/docs/examples/web/resources/shaders/glsl330/bloom.fs b/docs/examples/web/resources/shaders/glsl330/bloom.fs deleted file mode 100644 index 0307bc06..00000000 --- a/docs/examples/web/resources/shaders/glsl330/bloom.fs +++ /dev/null @@ -1,38 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 fragTintColor; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -void main() -{ - vec4 sum = vec4(0); - vec4 tc = vec4(0); - - for (int i = -4; i < 4; i++) - { - for (int j = -3; j < 3; j++) - { - sum += texture(texture0, fragTexCoord + vec2(j, i)*0.004)*0.25; - } - } - - // Texel color fetching from texture sampler - vec4 texelColor = texture(texture0, fragTexCoord); - - // Calculate final fragment color - if (texelColor.r < 0.3) tc = sum*sum*0.012 + texelColor; - else if (texelColor.r < 0.5) tc = sum*sum*0.009 + texelColor; - else tc = sum*sum*0.0075 + texelColor; - - finalColor = tc; -}
\ No newline at end of file |
