2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-04-03 11:09:40 -04:00
ChrisDill 9c09f1f030 Added examples folder
- Contains latest raylib 2.0 examples. Only converted a few of them to test out bindings.
- Need some sort of script to auto convert them across.
2018-08-01 17:19:05 +01:00

32 lines
1011 B
GLSL

#version 120
// Input vertex attributes (from vertex shader)
varying vec2 fragTexCoord;
varying vec4 fragColor;
// Input uniform values
uniform sampler2D texture0;
uniform vec4 colDiffuse;
// NOTE: Add here your custom variables
// NOTE: Render size values must be passed from code
const float renderWidth = 800.0;
const float renderHeight = 450.0;
vec3 offset = vec3(0.0, 1.3846153846, 3.2307692308);
vec3 weight = vec3(0.2270270270, 0.3162162162, 0.0702702703);
void main()
{
// Texel color fetching from texture sampler
vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight.x;
tc += texture2D(texture0, fragTexCoord + vec2(offset.y)/renderWidth, 0.0).rgb*weight.y;
tc += texture2D(texture0, fragTexCoord - vec2(offset.y)/renderWidth, 0.0).rgb*weight.y;
tc += texture2D(texture0, fragTexCoord + vec2(offset.z)/renderWidth, 0.0).rgb*weight.z;
tc += texture2D(texture0, fragTexCoord - vec2(offset.z)/renderWidth, 0.0).rgb*weight.z;
gl_FragColor = vec4(tc, 1.0);
}