Consolidate D3D11 constant buffers now that all shaders need a CSC constant buffer
This commit is contained in:
parent
245cd7f1a8
commit
4164a222ae
7 changed files with 14 additions and 46 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -8,16 +8,12 @@ struct ShaderInput
|
|||
float2 tex : TEXCOORD0;
|
||||
};
|
||||
|
||||
cbuffer ChromaLimitBuf : register(b0)
|
||||
{
|
||||
min16float3 chromaTexMax;
|
||||
};
|
||||
|
||||
cbuffer CSC_CONST_BUF : register(b1)
|
||||
cbuffer CSC_CONST_BUF : register(b0)
|
||||
{
|
||||
min16float3x3 cscMatrix;
|
||||
min16float3 offsets;
|
||||
min16float2 chromaOffset;
|
||||
min16float2 chromaTexMax;
|
||||
};
|
||||
|
||||
min16float4 main(ShaderInput input) : SV_TARGET
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
min16float4 main(ShaderInput input) : SV_TARGET
|
||||
{
|
||||
// Clamp the texcoords to avoid sampling the row of texels adjacent to the alignment padding
|
||||
min16float3 yuv = swizzle(videoTex.Sample(theSampler, min(input.tex, chromaTexMax.rg)));
|
||||
min16float3 yuv = swizzle(videoTex.Sample(theSampler, input.tex));
|
||||
|
||||
// Subtract the YUV offset for limited vs full range
|
||||
yuv -= offsets;
|
||||
|
|
|
|||
|
|
@ -7,14 +7,10 @@ struct ShaderInput
|
|||
float2 tex : TEXCOORD0;
|
||||
};
|
||||
|
||||
cbuffer ChromaLimitBuf : register(b0)
|
||||
{
|
||||
min16float3 chromaTexMax;
|
||||
};
|
||||
|
||||
cbuffer CSC_CONST_BUF : register(b1)
|
||||
cbuffer CSC_CONST_BUF : register(b0)
|
||||
{
|
||||
min16float3x3 cscMatrix;
|
||||
min16float3 offsets;
|
||||
min16float2 chromaOffset; // Unused for 4:4:4
|
||||
min16float2 chromaTexMax; // Unused for 4:4:4
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue