Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/Cg/HalftoneFP.cg @ 12302

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

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

File size: 502 bytes
Line 
1sampler2D RT : register(s0);
2sampler3D pattern : register(s1);
3
4float4 Halftone_ps(     float4 pos : POSITION,
5      float2 TexCoord : TEXCOORD0,
6                        uniform float2 numTiles,
7                        uniform float2 iNumTiles,
8                        uniform float2 iNumTiles2,
9                        uniform float4 lum) : COLOR
10{       
11        float3 local;
12        local.xy = fmod(TexCoord, iNumTiles);
13        float2 middle = TexCoord - local.xy;
14        local.xy = local.xy * numTiles;
15        middle +=  iNumTiles2;
16        local.z = dot(tex2D(RT, middle ) , lum);
17        float4 c = tex3D(pattern,local).r;
18        return c;
19}
Note: See TracBrowser for help on using the repository browser.