Line | |
---|
1 | texture texToShow;
|
---|
2 | sampler texSampler = sampler_state
|
---|
3 | {
|
---|
4 | Texture = <texToShow>;
|
---|
5 | MinFilter = Linear;
|
---|
6 | MagFilter = Linear;
|
---|
7 | MipFilter = None;
|
---|
8 | AddressU = Clamp;
|
---|
9 | AddressV = Clamp;
|
---|
10 | };
|
---|
11 |
|
---|
12 | struct vsInputShowTex
|
---|
13 | {
|
---|
14 | float4 pos : POSITION;
|
---|
15 | float2 tex : TEXCOORD0;
|
---|
16 | };
|
---|
17 |
|
---|
18 | struct vsOutputShowTex
|
---|
19 | {
|
---|
20 | float4 pos : POSITION;
|
---|
21 | float2 tex : TEXCOORD0;
|
---|
22 | };
|
---|
23 |
|
---|
24 | vsOutputShowTex
|
---|
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 |
|
---|
34 | float4
|
---|
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 |
|
---|
41 | technique 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.