// This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license uniform extern float4x4 MatrixTransform; Texture2D Texture : register(t0); sampler TextureSampler : register(s0); struct VertexShaderInput { float4 pos : POSITION; float4 col : COLOR; float2 tex : TEXCOORD0; }; struct PixelShaderInput { float4 pos : SV_POSITION; float4 col : COLOR; float2 tex : TEXCOORD0; }; PixelShaderInput SpriteVertexShader(VertexShaderInput input) { PixelShaderInput output; output.pos = mul(input.pos, MatrixTransform); output.col = input.col; output.tex = input.tex; return output; } float4 SpritePixelShader(PixelShaderInput input) : SV_Target { return Texture.Sample(TextureSampler, input.tex) * input.col; } technique10 SpriteTechnique { pass SpriteColorPass { SetVertexShader(CompileShader(vs_4_0, SpriteVertexShader())); SetPixelShader(CompileShader(ps_4_0, SpritePixelShader())); } }