diff options
Diffstat (limited to 'hlsl/prescale.fx')
-rw-r--r-- | hlsl/prescale.fx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/hlsl/prescale.fx b/hlsl/prescale.fx index 3f52c20b464..1529fb08c5a 100644 --- a/hlsl/prescale.fx +++ b/hlsl/prescale.fx @@ -25,6 +25,17 @@ sampler DiffuseSampler = sampler_state AddressW = CLAMP; }; +sampler PointSampler = sampler_state +{ + Texture = <Diffuse>; + MipFilter = POINT; + MinFilter = POINT; + MagFilter = POINT; + AddressU = CLAMP; + AddressV = CLAMP; + AddressW = CLAMP; +}; + //----------------------------------------------------------------------------- // Vertex Definitions //----------------------------------------------------------------------------- @@ -94,6 +105,15 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- +// Pre-scale Pixel Shader (point sampling) +//----------------------------------------------------------------------------- + +float4 ps_point_main(PS_INPUT Input) : COLOR +{ + return tex2D(PointSampler, Input.TexCoord); +} + +//----------------------------------------------------------------------------- // Pre-scale Technique //----------------------------------------------------------------------------- @@ -107,3 +127,14 @@ technique DefaultTechnique PixelShader = compile ps_3_0 ps_main(); } } + +technique PointTechnique +{ + pass Pass0 + { + Lighting = FALSE; + + VertexShader = compile vs_3_0 vs_main(); + PixelShader = compile ps_3_0 ps_point_main(); + } +} |