2012-03-10 14:31:54 +00:00
|
|
|
sampler2D decal : register(s0);
|
|
|
|
float4x4 modelViewProj : register(c0);
|
2012-03-09 20:50:12 +00:00
|
|
|
|
2012-03-10 14:31:54 +00:00
|
|
|
struct FP_IN
|
2012-03-09 20:50:12 +00:00
|
|
|
{
|
2012-03-10 14:31:54 +00:00
|
|
|
float2 texCoord : TEXCOORD0;
|
2012-03-09 20:50:12 +00:00
|
|
|
};
|
|
|
|
|
2012-03-10 14:31:54 +00:00
|
|
|
struct VP_IN
|
2012-03-09 20:50:12 +00:00
|
|
|
{
|
2012-03-10 14:31:54 +00:00
|
|
|
float2 position : POSITION;
|
|
|
|
float2 texCoord : TEXCOORD0;
|
2012-03-09 20:50:12 +00:00
|
|
|
};
|
|
|
|
|
2012-03-10 14:31:54 +00:00
|
|
|
struct VP_OUT
|
2012-03-09 20:50:12 +00:00
|
|
|
{
|
2012-03-10 14:31:54 +00:00
|
|
|
float4 oPosition : POSITION;
|
|
|
|
float2 otexCoord : TEXCOORD0;
|
2012-03-09 20:50:12 +00:00
|
|
|
};
|
|
|
|
|
2012-03-10 14:31:54 +00:00
|
|
|
struct FP_OUT
|
2012-03-09 20:50:12 +00:00
|
|
|
{
|
2012-03-10 14:31:54 +00:00
|
|
|
float4 color : COLOR;
|
|
|
|
};
|
|
|
|
|
|
|
|
FP_OUT main_fragment(FP_IN input) : COLOR
|
|
|
|
{
|
|
|
|
FP_OUT output;
|
|
|
|
output.color = tex2D(decal, input.texCoord);
|
|
|
|
return output;
|
2012-03-09 20:50:12 +00:00
|
|
|
}
|
|
|
|
|
2012-03-10 14:31:54 +00:00
|
|
|
VP_OUT main_vertex(VP_IN input)
|
2012-03-09 20:50:12 +00:00
|
|
|
{
|
2012-03-10 14:31:54 +00:00
|
|
|
VP_OUT output;
|
2012-03-10 14:51:42 +00:00
|
|
|
output.oPosition = mul(modelViewProj, float4(input.position, 0.0, 1.0));
|
2012-03-10 14:31:54 +00:00
|
|
|
output.otexCoord = input.texCoord;
|
2012-03-09 20:50:12 +00:00
|
|
|
return output;
|
|
|
|
}
|
|
|
|
|