The following shader fails to compile as the iterator in the second for-loop gets recognized as a redefinition of 'i':
#include "ReShade.fxh"
float3 Test_PS(float4 vpos : SV_Position, float2 texcoord : TexCoord) : SV_Target {
float3 color = tex2D(ReShade::BackBuffer, texcoord).rgb;
for(int i = 0; i < 2; i++) {
color = 1.0 - color;
}
for(int i = 0; i < 2; i++) {
color = 1.0 - color;
}
return color;
}
technique Test {
pass {
VertexShader = PostProcessVS;
PixelShader = Test_PS;
/* RenderTarget = BackBuffer */
}
}
[Edit] This happens in all three APIs.