(D3D11) forgot to update the included shader.

This commit is contained in:
aliaspider 2018-01-25 01:46:30 +01:00
parent 8354ffd452
commit 0cd2310a6f
2 changed files with 9 additions and 1 deletions

View File

@ -333,7 +333,7 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
{ "PARAMS", 0, DXGI_FORMAT_R32G32_FLOAT, 0, offsetof(d3d11_sprite_t, params),
D3D11_INPUT_PER_VERTEX_DATA, 0 },
};
#if 0
#if 1
d3d_compile(sprite, sizeof(sprite), "VSMain", "vs_5_0", &vs_code);
d3d_compile(sprite, sizeof(sprite), "PSMain", "ps_5_0", &ps_code);
d3d_compile(sprite, sizeof(sprite), "PSMainA8", "ps_5_0", &ps_A8_code);

View File

@ -10,6 +10,7 @@ SRC(
float4 color1 : COLOR1;
float4 color2 : COLOR2;
float4 color3 : COLOR3;
float2 params : PARAMS;
};
struct GSInput
{
@ -31,6 +32,8 @@ SRC(
{
GSInput output;
output.position = input.position * 2.0;
output.position.xy += output.position.zw * (1.0 - input.params.x) * 0.5f;
output.position.zw *= input.params.x;
output.position.w *= -1.0;
output.position.x = output.position.x - 1.0;
output.position.y = 1.0 - output.position.y;
@ -74,10 +77,15 @@ SRC(
float4 PSMain(PSInput input) : SV_TARGET
{
return input.color * t0.Sample(s0, input.texcoord);
// return float4(1.0f, 1.0f, 1.0f, 1.0f);
// return input.color;
};
float4 PSMainA8(PSInput input) : SV_TARGET
{
// return t0.Sample(s0, input.texcoord).a;
return input.color * t0.Sample(s0, input.texcoord).a;
// return input.color;
};
)