Bug report & fix: interpolation qualifier mismatch error in ReShade 6.7.x
Hi, I ran into a compilation error with qUINT_lightroom.fx under ReShade 6.7.3 (D3D12). The shader was failing with the following errors:
qUINT_lightroom.fx(851, 1): error X4568: 'PS_ProcessLUT': input parameter 'huefactors' interpolation qualifiers do not match vertex shader ones
qUINT_lightroom.fx(857, 1): error X4568: 'PS_ApplyLUT': input parameter 'huefactors' interpolation qualifiers do not match vertex shader ones
qUINT_lightroom.fx(871, 1): error X4568: 'PS_DisplayStatistics': input parameter 'huefactors' interpolation qualifiers do not match vertex shader ones
Root cause
The HLSL compiler in recent ReShade versions is stricter about how interpolants are declared across shader stages. Passing a raw float[7] array tagged as nointerpolation on a single semantic (TEXCOORD1) is ambiguous - the compiler can no longer resolve how to map 7 floats onto a single 4-component register.
Fix
Replaced the loose array parameter with a dedicated VStoPS struct that packs the 7 hue factors into:
nointerpolation float4 huefactors0 : TEXCOORD1 (indices 0-3)
nointerpolation float3 huefactors1 : TEXCOORD2 (indices 4-6)
Each semantic maps cleanly onto one register. The local float huefactors[7] array is then reconstructed at the top of each pixel shader before being passed to palette(), so the function itself required no changes.
Before:
void VS_Lightroom(in uint id : SV_VertexID, out float4 position : SV_Position, out float2 uv : TEXCOORD0, out nointerpolation float huefactors[7] : TEXCOORD1)
After:
struct VStoPS
{
float4 position : SV_Position;
float2 uv : TEXCOORD0;
nointerpolation float4 huefactors0 : TEXCOORD1; // hf[0..3]
nointerpolation float3 huefactors1 : TEXCOORD2; // hf[4..6]
};
VStoPS VS_Lightroom(in uint id : SV_VertexID)
The fix was produced by [Claude](https://claude.ai) (Anthropic's AI assistant) - I just tested and confirmed it works. Happy to submit a pull request with the corrected file if that would be useful.
Bug report & fix: interpolation qualifier mismatch error in ReShade 6.7.x
Hi, I ran into a compilation error with
qUINT_lightroom.fxunder ReShade 6.7.3 (D3D12). The shader was failing with the following errors:Root cause
The HLSL compiler in recent ReShade versions is stricter about how interpolants are declared across shader stages. Passing a raw
float[7]array tagged asnointerpolationon a single semantic (TEXCOORD1) is ambiguous - the compiler can no longer resolve how to map 7 floats onto a single 4-component register.Fix
Replaced the loose array parameter with a dedicated
VStoPSstruct that packs the 7 hue factors into:nointerpolation float4 huefactors0 : TEXCOORD1(indices 0-3)nointerpolation float3 huefactors1 : TEXCOORD2(indices 4-6)Each semantic maps cleanly onto one register. The local
float huefactors[7]array is then reconstructed at the top of each pixel shader before being passed topalette(), so the function itself required no changes.Before:
After: