Clamp chroma texcoords to avoid sampling alignment padding
This resolves #885 without the massive perf hit on lower end Intel GPUs.
This commit is contained in:
parent
c3bd7edc4e
commit
94943d2865
7 changed files with 43 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
|||
#include "d3d11_video_pixel_start.hlsli"
|
||||
|
||||
cbuffer CSC_CONST_BUF : register(b0)
|
||||
cbuffer CSC_CONST_BUF : register(b1)
|
||||
{
|
||||
min16float3x3 cscMatrix;
|
||||
min16float3 offsets;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
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, input.tex));
|
||||
chrominancePlane.Sample(theSampler, min(input.tex, chromaTexMax.rg)));
|
||||
|
||||
// Subtract the YUV offset for limited vs full range
|
||||
yuv -= offsets;
|
||||
|
|
|
|||
|
|
@ -6,4 +6,9 @@ struct ShaderInput
|
|||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
};
|
||||
};
|
||||
|
||||
cbuffer ChromaLimitBuf : register(b0)
|
||||
{
|
||||
min16float3 chromaTexMax;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue