source: GTP/trunk/App/Demos/Illum/pathmap/showTex.fx @ 2197

Revision 2197, 916 bytes checked in by szirmay, 17 years ago (diff)
Line 
1texture texToShow;
2sampler texSampler = sampler_state
3{
4   Texture = <texToShow>;
5   MinFilter = Linear;
6   MagFilter = Linear;
7   MipFilter = None;
8   AddressU = Clamp;
9   AddressV = Clamp;
10};
11
12struct vsInputShowTex
13{
14    float4      pos                     : POSITION;
15    float2      tex                     : TEXCOORD0;   
16};
17
18struct vsOutputShowTex
19{
20    float4      pos                     : POSITION;
21    float2      tex                     : TEXCOORD0;
22};
23
24vsOutputShowTex
25        vsShowTex(vsInputShowTex input)
26{
27    vsOutputShowTex output = (vsOutputShowTex)0;
28    output.pos = input.pos;
29    output.tex = input.tex;
30
31    return output;
32}
33
34float4
35        psShowTex(vsOutputShowTex input) : COLOR0
36{
37        float3 val = tex2D(texSampler, float2(input.tex.x  /* / 32.0 */, input.tex.y)).rgb;
38        return float4(val * 0.1, 1);
39}
40
41technique ShowTex{
42        pass P0
43    {
44        VertexShader = compile vs_2_0 vsShowTex();
45        PixelShader  = compile ps_2_0 psShowTex();
46    }
47}
48
Note: See TracBrowser for help on using the repository browser.