2014-02-11 13:29:19 +01:00
|
|
|
#include "Header.hlsli"
|
|
|
|
|
|
|
|
[maxvertexcount(4)]
|
|
|
|
void main(point Text2DIn input[1],inout TriangleStream<Pixel2DIn> Quads)
|
|
|
|
{
|
|
|
|
float startoff=input[0].off*input[0].coff;
|
|
|
|
float endoff=startoff+input[0].coff;
|
|
|
|
Pixel2DIn output;
|
|
|
|
|
2014-02-18 09:32:10 +01:00
|
|
|
output.Pos = mul(float4(-1,-1,0,1), Translation);
|
2014-02-11 13:29:19 +01:00
|
|
|
output.Pos.x += input[0].Pos;
|
|
|
|
output.Uv = float2(startoff,1);
|
|
|
|
Quads.Append(output);
|
|
|
|
|
2014-02-18 09:32:10 +01:00
|
|
|
output.Pos = mul(float4(-1,1,0,1), Translation);
|
2014-02-11 13:29:19 +01:00
|
|
|
output.Pos.x += input[0].Pos;
|
|
|
|
output.Uv = float2(startoff,0);
|
|
|
|
Quads.Append(output);
|
|
|
|
|
2014-02-18 09:32:10 +01:00
|
|
|
output.Pos = mul(float4(1,-1,0,1), Translation);
|
2014-02-11 13:29:19 +01:00
|
|
|
output.Pos.x += input[0].Pos;
|
|
|
|
output.Uv = float2(endoff,1);
|
|
|
|
Quads.Append(output);
|
|
|
|
|
2014-02-18 09:32:10 +01:00
|
|
|
output.Pos = mul(float4(1,1,0,1), Translation);
|
2014-02-11 13:29:19 +01:00
|
|
|
output.Pos.x += input[0].Pos;
|
|
|
|
output.Uv = float2(endoff,0);
|
|
|
|
Quads.Append(output);
|
|
|
|
}
|