mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(D3D11) forgot to update the included shader.
This commit is contained in:
parent
8354ffd452
commit
0cd2310a6f
@ -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),
|
{ "PARAMS", 0, DXGI_FORMAT_R32G32_FLOAT, 0, offsetof(d3d11_sprite_t, params),
|
||||||
D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
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), "VSMain", "vs_5_0", &vs_code);
|
||||||
d3d_compile(sprite, sizeof(sprite), "PSMain", "ps_5_0", &ps_code);
|
d3d_compile(sprite, sizeof(sprite), "PSMain", "ps_5_0", &ps_code);
|
||||||
d3d_compile(sprite, sizeof(sprite), "PSMainA8", "ps_5_0", &ps_A8_code);
|
d3d_compile(sprite, sizeof(sprite), "PSMainA8", "ps_5_0", &ps_A8_code);
|
||||||
|
@ -10,6 +10,7 @@ SRC(
|
|||||||
float4 color1 : COLOR1;
|
float4 color1 : COLOR1;
|
||||||
float4 color2 : COLOR2;
|
float4 color2 : COLOR2;
|
||||||
float4 color3 : COLOR3;
|
float4 color3 : COLOR3;
|
||||||
|
float2 params : PARAMS;
|
||||||
};
|
};
|
||||||
struct GSInput
|
struct GSInput
|
||||||
{
|
{
|
||||||
@ -31,6 +32,8 @@ SRC(
|
|||||||
{
|
{
|
||||||
GSInput output;
|
GSInput output;
|
||||||
output.position = input.position * 2.0;
|
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.w *= -1.0;
|
||||||
output.position.x = output.position.x - 1.0;
|
output.position.x = output.position.x - 1.0;
|
||||||
output.position.y = 1.0 - output.position.y;
|
output.position.y = 1.0 - output.position.y;
|
||||||
@ -74,10 +77,15 @@ SRC(
|
|||||||
float4 PSMain(PSInput input) : SV_TARGET
|
float4 PSMain(PSInput input) : SV_TARGET
|
||||||
{
|
{
|
||||||
return input.color * t0.Sample(s0, input.texcoord);
|
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
|
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 * t0.Sample(s0, input.texcoord).a;
|
||||||
|
// return input.color;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user