2012-08-25 17:27: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
|
2011-12-14 11:49:04 +00:00
|
|
|
|
|
|
|
//TODO: dummy implementation / placeholder
|
|
|
|
|
2011-12-27 08:19:27 +00:00
|
|
|
uniform extern float4x4 World;
|
|
|
|
uniform extern float4x4 View;
|
|
|
|
uniform extern float4x4 Projection;
|
2011-12-14 11:49:04 +00:00
|
|
|
|
2011-12-27 08:19:27 +00:00
|
|
|
/*
|
2011-12-14 11:49:04 +00:00
|
|
|
Texture2D<float4> Texture : register(t0);
|
|
|
|
sampler TextureSampler : register(s0);
|
2011-12-27 08:19:27 +00:00
|
|
|
*/
|
2011-12-14 11:49:04 +00:00
|
|
|
|
2011-12-27 08:19:27 +00:00
|
|
|
struct VertexColorVertexShaderInput
|
2011-12-14 11:49:04 +00:00
|
|
|
{
|
2011-12-27 08:19:27 +00:00
|
|
|
float4 Position : POSITION;
|
|
|
|
float4 Color : COLOR;
|
2011-12-14 11:49:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct PixelShaderInput
|
|
|
|
{
|
2011-12-27 08:19:27 +00:00
|
|
|
float4 Position : SV_POSITION;
|
|
|
|
float4 Color : COLOR;
|
|
|
|
float2 TexCoord0 : TEXCOORD0;
|
2011-12-14 11:49:04 +00:00
|
|
|
};
|
|
|
|
|
2011-12-27 08:19:27 +00:00
|
|
|
PixelShaderInput VertexColorVertexShader( VertexColorVertexShaderInput input )
|
2011-12-14 11:49:04 +00:00
|
|
|
{
|
|
|
|
PixelShaderInput output = (PixelShaderInput)0;
|
|
|
|
|
2011-12-27 08:19:27 +00:00
|
|
|
float4 worldPosition = mul(input.Position, World);
|
|
|
|
float4 viewPosition = mul(worldPosition, View);
|
|
|
|
output.Position = mul(viewPosition, Projection);
|
|
|
|
|
|
|
|
output.Color = input.Color;
|
|
|
|
output.TexCoord0 = (float2)0;
|
2011-12-14 11:49:04 +00:00
|
|
|
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
|
2011-12-27 08:19:27 +00:00
|
|
|
float4 VertexColorPixelShader( PixelShaderInput input ) : SV_Target
|
2011-12-14 11:49:04 +00:00
|
|
|
{
|
2011-12-27 08:19:27 +00:00
|
|
|
return input.Color;
|
2011-12-14 11:49:04 +00:00
|
|
|
}
|
|
|
|
|
2011-12-27 08:19:27 +00:00
|
|
|
technique10 VertexColor
|
2011-12-14 11:49:04 +00:00
|
|
|
{
|
2011-12-27 08:19:27 +00:00
|
|
|
pass VertexColorPass
|
2011-12-14 11:49:04 +00:00
|
|
|
{
|
|
|
|
SetGeometryShader( 0 );
|
2011-12-27 08:19:27 +00:00
|
|
|
SetVertexShader( CompileShader( vs_4_0, VertexColorVertexShader() ) );
|
|
|
|
SetPixelShader( CompileShader( ps_4_0, VertexColorPixelShader() ) );
|
2011-12-14 11:49:04 +00:00
|
|
|
}
|
|
|
|
}
|