Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/data_extern/programs/GLSL150/SharpenEdgesFP.glsl @ 12216

Last change on this file since 12216 was 12115, checked in by wiesep, 6 years ago

Changed folder structure, deletet some unused files and cleaned up code

File size: 579 bytes
Line 
1#version 150
2
3uniform sampler2D RT;
4uniform vec2 vTexelSize;
5
6in vec2 oUv0;
7in vec2 oUv1;
8out vec4 fragColour;
9
10void main()
11{
12        vec2 usedTexelED[8];
13        usedTexelED[0] = vec2(-1, -1);
14        usedTexelED[1] = vec2(0, -1);
15        usedTexelED[2] = vec2(1, -1);
16        usedTexelED[3] = vec2(-1, 0);
17        usedTexelED[4] = vec2(1, 0);
18        usedTexelED[5] = vec2(-1, 1);
19        usedTexelED[6] = vec2(0, 1);
20        usedTexelED[7] = vec2(1, 1);
21
22    vec4 tc = texture(RT, oUv0);
23        vec4 cAvgColor = vec4(9.0 * tc);
24
25        for(int t=0; t<8; t++)
26                cAvgColor -= texture(RT, oUv0 + vTexelSize * usedTexelED[t]);
27
28        fragColour = cAvgColor;
29}
Note: See TracBrowser for help on using the repository browser.