2012-03-10 17:49:45 +00:00
|
|
|
/*
|
|
|
|
VERTEX_SHADER
|
|
|
|
*/
|
|
|
|
void main_vertex
|
|
|
|
(
|
|
|
|
float2 position : POSITION,
|
|
|
|
float2 texCoord : TEXCOORD0,
|
2012-04-15 15:53:48 +00:00
|
|
|
uniform float4x4 modelViewProj,
|
2012-03-10 17:49:45 +00:00
|
|
|
out float4 oPosition : POSITION,
|
|
|
|
out float2 otexCoord : TEXCOORD
|
|
|
|
)
|
2012-03-09 20:50:12 +00:00
|
|
|
{
|
2012-03-10 17:49:45 +00:00
|
|
|
oPosition = mul(modelViewProj, float4(position, 0.0, 1.0));
|
|
|
|
otexCoord = texCoord;
|
|
|
|
}
|
2012-03-09 20:50:12 +00:00
|
|
|
|
|
|
|
|
2012-03-10 17:49:45 +00:00
|
|
|
/*
|
|
|
|
FRAGMENT SHADER
|
|
|
|
*/
|
|
|
|
struct output
|
2012-03-09 20:50:12 +00:00
|
|
|
{
|
2012-03-10 17:49:45 +00:00
|
|
|
float4 color : COLOR;
|
2012-03-09 20:50:12 +00:00
|
|
|
};
|
|
|
|
|
2012-03-10 17:49:45 +00:00
|
|
|
struct input
|
2012-03-09 20:50:12 +00:00
|
|
|
{
|
2012-03-10 17:49:45 +00:00
|
|
|
float2 video_size;
|
|
|
|
float2 texture_size;
|
|
|
|
float2 output_size;
|
2012-03-10 14:31:54 +00:00
|
|
|
};
|
|
|
|
|
2012-03-09 20:50:12 +00:00
|
|
|
|
2012-04-15 15:50:07 +00:00
|
|
|
output main_fragment(float2 texCoord : TEXCOORD0, uniform sampler2D decal : TEXUNIT0, uniform input IN)
|
2012-03-09 20:50:12 +00:00
|
|
|
{
|
2012-03-10 17:49:45 +00:00
|
|
|
output OUT;
|
|
|
|
OUT.color = tex2D(decal, texCoord);
|
|
|
|
return OUT;
|
2012-03-09 20:50:12 +00:00
|
|
|
}
|
|
|
|
|