blob: 4ab4c4d926f79292d506d8e952ebb5d3a4ca3b33 [file] [log] [blame]
/*#pragma settings NoRTFlip*/
uniform half4 testInputs; // equals (-1.25, 0, 0.75, 2.25)
uniform half4 colorGreen, colorRed;
half4 main(float2 coords) {
half4 expected = half4(0); // derivative of a constant is zero
return (dFdy(testInputs.x) == expected.x &&
dFdy(testInputs.xy) == expected.xy &&
dFdy(testInputs.xyz) == expected.xyz &&
dFdy(testInputs.xyzw) == expected.xyzw &&
sign(dFdy(coords.xx)) == half2(0, 0) &&
sign(dFdy(coords.yy)) == half2(1, 1) &&
sign(dFdy(coords.xy)) == half2(0, 1)) ? colorGreen : colorRed;
}