mirror of
https://github.com/libretro/RetroArch
synced 2025-01-01 12:11:47 +00:00
31 lines
799 B
C
31 lines
799 B
C
static const char *font_hlsl_d3d9_program =
|
|
"struct VS_IN\n"
|
|
"{\n"
|
|
"float2 Pos : POSITION;\n"
|
|
"float2 Tex : TEXCOORD0;\n"
|
|
"};\n"
|
|
"struct VS_OUT\n"
|
|
"{\n"
|
|
"float4 Position : POSITION;\n"
|
|
"float2 TexCoord0 : TEXCOORD0;\n"
|
|
"};\n"
|
|
"uniform float4 Color : register(c1);\n"
|
|
"uniform float2 TexScale : register(c2);\n"
|
|
"sampler FontTexture : register(s0);\n"
|
|
"VS_OUT main_vertex( VS_IN In )\n"
|
|
"{\n"
|
|
"VS_OUT Out;\n"
|
|
"Out.Position.x = (In.Pos.x-0.5);\n"
|
|
"Out.Position.y = (In.Pos.y-0.5);\n"
|
|
"Out.Position.z = ( 0.0 );\n"
|
|
"Out.Position.w = ( 1.0 );\n"
|
|
"Out.TexCoord0.x = In.Tex.x * TexScale.x;\n"
|
|
"Out.TexCoord0.y = In.Tex.y * TexScale.y;\n"
|
|
"return Out;\n"
|
|
"}\n"
|
|
"float4 main_fragment( VS_OUT In ) : COLOR0\n"
|
|
"{\n"
|
|
"float4 FontTexel = tex2D( FontTexture, In.TexCoord0 );\n"
|
|
"return FontTexel;\n"
|
|
"}\n";
|