Skip to content

Commit

Permalink
convert.fx: Add color support to IA
Browse files Browse the repository at this point in the history
Support color input in vs and ps.
Skipping dx9.
  • Loading branch information
tadanokojin authored and lightningterror committed Dec 20, 2018
1 parent e683ce2 commit 5713993
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/GSdx/Renderers/DX11/GSDevice11.cpp
Expand Up @@ -198,6 +198,7 @@ bool GSDevice11::Create(const std::shared_ptr<GSWnd> &wnd)
{
{"POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
{"TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 16, D3D11_INPUT_PER_VERTEX_DATA, 0},
{"COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, 28, D3D11_INPUT_PER_VERTEX_DATA, 0},
};

std::vector<char> shader;
Expand Down
4 changes: 4 additions & 0 deletions plugins/GSdx/res/convert.fx
Expand Up @@ -8,12 +8,14 @@ struct VS_INPUT
{
float4 p : POSITION;
float2 t : TEXCOORD0;
float4 c : COLOR;
};

struct VS_OUTPUT
{
float4 p : SV_Position;
float2 t : TEXCOORD0;
float4 c : COLOR;
};

Texture2D Texture;
Expand All @@ -28,6 +30,7 @@ struct PS_INPUT
{
float4 p : SV_Position;
float2 t : TEXCOORD0;
float4 c : COLOR;
};

struct PS_OUTPUT
Expand All @@ -41,6 +44,7 @@ VS_OUTPUT vs_main(VS_INPUT input)

output.p = input.p;
output.t = input.t;
output.c = input.c;

return output;
}
Expand Down

0 comments on commit 5713993

Please sign in to comment.