texture texToShow; sampler texSampler = sampler_state { Texture = ; MinFilter = Linear; MagFilter = Linear; MipFilter = None; AddressU = Clamp; AddressV = Clamp; }; struct vsInputShowTex { float4 pos : POSITION; float2 tex : TEXCOORD0; }; struct vsOutputShowTex { float4 pos : POSITION; float2 tex : TEXCOORD0; }; vsOutputShowTex vsShowTex(vsInputShowTex input) { vsOutputShowTex output = (vsOutputShowTex)0; output.pos = input.pos; output.tex = input.tex; return output; } float4 psShowTex(vsOutputShowTex input) : COLOR0 { float3 val = tex2D(texSampler, float2(input.tex.x /* / 32.0 */, input.tex.y)).rgb; return float4(val * 0.1, 1); } technique ShowTex{ pass P0 { VertexShader = compile vs_2_0 vsShowTex(); PixelShader = compile ps_2_0 psShowTex(); } }