Render luma onto nv12 surface

This commit is contained in:
loki
2021-04-30 20:01:15 +02:00
parent fe8c2ceab9
commit 127b5501d9
9 changed files with 601 additions and 132 deletions
+23
View File
@@ -0,0 +1,23 @@
//--------------------------------------------------------------------------------------
// ScreenVS.hlsl
//--------------------------------------------------------------------------------------
struct PS_INPUT
{
float4 Pos : SV_POSITION;
float2 Tex : TEXCOORD;
};
//--------------------------------------------------------------------------------------
// Vertex Shader
//--------------------------------------------------------------------------------------
PS_INPUT VS(uint vI : SV_VERTEXID)
{
PS_INPUT output = (PS_INPUT)0;
float2 texcoord = float2(vI & 1, vI >> 1);
output.Pos = float4((texcoord.x - 0.5f) * 2.0f, -(texcoord.y - 0.5f) * 2.0f, 0.0f, 1.0f);
output.Tex = texcoord;
return output;
}