Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/GLSL150/HalftoneFP.glsl @ 12181

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

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

File size: 453 bytes
Line 
1#version 150
2
3in vec4 pos;
4in vec2 oUv0;
5
6uniform vec2 numTiles;
7uniform vec2 iNumTiles;
8uniform vec2 iNumTiles2;
9uniform vec4 lum;
10uniform sampler2D RT;
11uniform sampler3D noise;
12
13out vec4 fragColour;
14
15void main()
16{
17        vec3 local;
18        local.xy = mod(oUv0, iNumTiles);
19        vec2 middle = oUv0 - local.xy;
20        local.xy = local.xy * numTiles;
21        middle +=  iNumTiles2;
22        local.z = dot(texture(RT, middle), lum);
23        vec4 c = vec4(texture(noise,local).r);
24        fragColour = c;
25}
Note: See TracBrowser for help on using the repository browser.