mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-10 13:44:17 +00:00
Use a Texture2DArray in HLSL to match the SRVs
This commit is contained in:
parent
dff02eab7d
commit
d389f9a6e9
10 changed files with 20 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
|||
fxc /T vs_4_0_level_9_3 /Fo d3d11_vertex.fxc d3d11_vertex.hlsl
|
||||
fxc /T vs_4_0 /Fo d3d11_vertex.fxc d3d11_vertex.hlsl
|
||||
|
||||
fxc /T ps_4_0_level_9_3 /Fo d3d11_overlay_pixel.fxc d3d11_overlay_pixel.hlsl
|
||||
fxc /T ps_4_0_level_9_3 /Fo d3d11_genyuv_pixel.fxc d3d11_genyuv_pixel.hlsl
|
||||
fxc /T ps_4_0_level_9_3 /Fo d3d11_bt601lim_pixel.fxc d3d11_bt601lim_pixel.hlsl
|
||||
fxc /T ps_4_0_level_9_3 /Fo d3d11_bt2020lim_pixel.fxc d3d11_bt2020lim_pixel.hlsl
|
||||
fxc /T ps_4_0 /Fo d3d11_overlay_pixel.fxc d3d11_overlay_pixel.hlsl
|
||||
fxc /T ps_4_0 /Fo d3d11_genyuv_pixel.fxc d3d11_genyuv_pixel.hlsl
|
||||
fxc /T ps_4_0 /Fo d3d11_bt601lim_pixel.fxc d3d11_bt601lim_pixel.hlsl
|
||||
fxc /T ps_4_0 /Fo d3d11_bt2020lim_pixel.fxc d3d11_bt2020lim_pixel.hlsl
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,13 +1,13 @@
|
|||
struct ShaderInput
|
||||
{
|
||||
float2 pos : POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float3 tex : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct ShaderOutput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float3 tex : TEXCOORD0;
|
||||
};
|
||||
|
||||
ShaderOutput main(ShaderInput input)
|
||||
|
|
|
@ -2,7 +2,7 @@ min16float4 main(ShaderInput input) : SV_TARGET
|
|||
{
|
||||
// Clamp the chrominance texcoords to avoid sampling the row of texels adjacent to the alignment padding
|
||||
min16float3 yuv = min16float3(luminancePlane.Sample(theSampler, input.tex),
|
||||
chrominancePlane.Sample(theSampler, min(input.tex, chromaTexMax.rg)));
|
||||
chrominancePlane.Sample(theSampler, min(input.tex, chromaTexMax)));
|
||||
|
||||
// Subtract the YUV offset for limited vs full range
|
||||
yuv -= offsets;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
Texture2D<min16float> luminancePlane : register(t0);
|
||||
Texture2D<min16float2> chrominancePlane : register(t1);
|
||||
Texture2DArray<min16float> luminancePlane : register(t0);
|
||||
Texture2DArray<min16float2> chrominancePlane : register(t1);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct ShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float3 tex : TEXCOORD0;
|
||||
};
|
||||
|
||||
cbuffer ChromaLimitBuf : register(b0)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
typedef struct _VERTEX
|
||||
{
|
||||
float x, y;
|
||||
float tu, tv;
|
||||
float tu, tv, tw;
|
||||
} VERTEX, *PVERTEX;
|
||||
|
||||
#define CSC_MATRIX_RAW_ELEMENT_COUNT 9
|
||||
|
@ -872,10 +872,10 @@ void D3D11VARenderer::notifyOverlayUpdated(Overlay::OverlayType type)
|
|||
|
||||
VERTEX verts[] =
|
||||
{
|
||||
{renderRect.x, renderRect.y, 0, 1},
|
||||
{renderRect.x, renderRect.y+renderRect.h, 0, 0},
|
||||
{renderRect.x+renderRect.w, renderRect.y, 1, 1},
|
||||
{renderRect.x+renderRect.w, renderRect.y+renderRect.h, 1, 0},
|
||||
{renderRect.x, renderRect.y, 0, 1, 0},
|
||||
{renderRect.x, renderRect.y+renderRect.h, 0, 0, 0},
|
||||
{renderRect.x+renderRect.w, renderRect.y, 1, 1, 0},
|
||||
{renderRect.x+renderRect.w, renderRect.y+renderRect.h, 1, 0, 0},
|
||||
};
|
||||
|
||||
D3D11_BUFFER_DESC vbDesc = {};
|
||||
|
@ -1287,10 +1287,10 @@ bool D3D11VARenderer::setupRenderingResources()
|
|||
|
||||
VERTEX verts[] =
|
||||
{
|
||||
{renderRect.x, renderRect.y, 0, vMax},
|
||||
{renderRect.x, renderRect.y+renderRect.h, 0, 0},
|
||||
{renderRect.x+renderRect.w, renderRect.y, uMax, vMax},
|
||||
{renderRect.x+renderRect.w, renderRect.y+renderRect.h, uMax, 0},
|
||||
{renderRect.x, renderRect.y, 0, vMax, 0},
|
||||
{renderRect.x, renderRect.y+renderRect.h, 0, 0, 0},
|
||||
{renderRect.x+renderRect.w, renderRect.y, uMax, vMax, 0},
|
||||
{renderRect.x+renderRect.w, renderRect.y+renderRect.h, uMax, 0, 0},
|
||||
};
|
||||
|
||||
D3D11_BUFFER_DESC vbDesc = {};
|
||||
|
|
Loading…
Reference in a new issue