2012-09-09 07:55:45 +00:00
|
|
|
// 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
|
2012-03-10 11:52:21 +00:00
|
|
|
|
|
|
|
uniform extern float4x4 World;
|
|
|
|
uniform extern float4x4 View;
|
|
|
|
uniform extern float4x4 Projection;
|
|
|
|
|
2012-03-10 22:29:29 +00:00
|
|
|
uniform extern float4x4 WorldViewProj;
|
|
|
|
uniform extern float4x4 WorldInverseTranspose;
|
|
|
|
|
|
|
|
Texture2D<float4> Texture : register(t0);
|
|
|
|
sampler TextureSampler : register(s0);
|
|
|
|
|
2012-03-10 11:52:21 +00:00
|
|
|
struct VertexShaderInput
|
|
|
|
{
|
2012-03-10 22:29:29 +00:00
|
|
|
float4 Position : POSITION0;
|
|
|
|
float3 Normal : NORMAL;
|
|
|
|
float2 TexCoord : TEXCOORD0;
|
2012-03-10 11:52:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct VertexShaderOutput
|
|
|
|
{
|
|
|
|
float4 Position : SV_POSITION;
|
2012-03-10 22:29:29 +00:00
|
|
|
float3 Normal : NORMAL;
|
|
|
|
float2 TexCoord : TEXCOORD0;
|
2012-03-10 11:52:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
|
|
|
|
{
|
|
|
|
VertexShaderOutput output;
|
|
|
|
|
2012-03-10 22:29:29 +00:00
|
|
|
output.Position = mul(input.Position, WorldViewProj);
|
|
|
|
output.Normal = normalize(mul(input.Normal.xyz, (float3x3)WorldInverseTranspose));
|
|
|
|
output.TexCoord = input.TexCoord;
|
2012-03-10 11:52:21 +00:00
|
|
|
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
|
|
|
|
float4 PixelShaderFunction(VertexShaderOutput input) : SV_TARGET
|
|
|
|
{
|
2012-03-10 22:29:29 +00:00
|
|
|
return Texture.Sample(TextureSampler, input.TexCoord);
|
2012-03-10 11:52:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
technique10 Technique1
|
|
|
|
{
|
|
|
|
pass Pass1
|
|
|
|
{
|
|
|
|
VertexShader = compile vs_4_0 VertexShaderFunction();
|
|
|
|
PixelShader = compile ps_4_0 PixelShaderFunction();
|
|
|
|
}
|
|
|
|
}
|