moonlight-qt/app/shaders/d3d11_video_pixel_end.hlsli
Cameron Gutman 1a1ce05959 Revert "Use a Texture2DArray in HLSL to match the SRVs"
This reverts commit d389f9a6e9bc0e06dec1b299a330be0640b75652.
2024-06-29 14:07:41 -05:00

14 lines
551 B
HLSL

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)));
// Subtract the YUV offset for limited vs full range
yuv -= offsets;
// Multiply by the conversion matrix for this colorspace
yuv = mul(yuv, cscMatrix);
return min16float4(yuv, 1.0);
}