RetroArch
font.hlsl.d3d9.h
Go to the documentation of this file.
1 #include "shaders_common.h"
2 
3 static const char *font_hlsl_d3d9_program = CG(
4  struct VS_IN
5  {
6  float2 Pos : POSITION;
7  float2 Tex : TEXCOORD0;
8  };
9 
10  struct VS_OUT
11  {
12  float4 Position : POSITION;
13  float2 TexCoord0 : TEXCOORD0;
14  };
15 
16  uniform float4 Color : register(c1);
17  uniform float2 TexScale : register(c2);
18  sampler FontTexture : register(s0);
19 
20  VS_OUT main_vertex( VS_IN In )
21  {
22  VS_OUT Out;
23  Out.Position.x = (In.Pos.x-0.5);
24  Out.Position.y = (In.Pos.y-0.5);
25  Out.Position.z = ( 0.0 );
26  Out.Position.w = ( 1.0 );
27  Out.TexCoord0.x = In.Tex.x * TexScale.x;
28  Out.TexCoord0.y = In.Tex.y * TexScale.y;
29  return Out;
30  }
31 
32  float4 main_fragment( VS_OUT In ) : COLOR0
33  {
34  float4 FontTexel = tex2D( FontTexture, In.TexCoord0 );
35  return FontTexel;
36  }
37 );
ush Pos
Definition: deflate.h:89
static const char * font_hlsl_d3d9_program
Definition: font.hlsl.d3d9.h:3
#define CG(src)
Definition: shaders_common.h:9
GLuint sampler
Definition: glext.h:7950