+// GLSL is pickier than the C++ preprocessor in if-testing for undefined
+// tokens; do some fixups here to keep it happy.
+
+#ifndef YCBCR_OUTPUT_PLANAR
+#define YCBCR_OUTPUT_PLANAR 0
+#endif
+
+#ifndef YCBCR_OUTPUT_SPLIT_Y_AND_CBCR
+#define YCBCR_OUTPUT_SPLIT_Y_AND_CBCR 0
+#endif
+
+#ifndef SECOND_YCBCR_OUTPUT_PLANAR
+#define SECOND_YCBCR_OUTPUT_PLANAR 0
+#endif
+
+#ifndef SECOND_YCBCR_OUTPUT_SPLIT_Y_AND_CBCR
+#define SECOND_YCBCR_OUTPUT_SPLIT_Y_AND_CBCR 0
+#endif
+
+#ifndef SECOND_YCBCR_OUTPUT_INTERLEAVED
+#define SECOND_YCBCR_OUTPUT_INTERLEAVED 0
+#endif
+
+#ifndef YCBCR_ALSO_OUTPUT_RGBA
+#define YCBCR_ALSO_OUTPUT_RGBA 0
+#endif
+
+#ifndef SQUARE_ROOT_TRANSFORMATION
+#define SQUARE_ROOT_TRANSFORMATION 0
+#endif
+
+#if YCBCR_OUTPUT_PLANAR
+out vec4 Y, Cb, Cr;
+#elif YCBCR_OUTPUT_SPLIT_Y_AND_CBCR
+out vec4 Y, Chroma;
+#else
+out vec4 FragColor; // Y'CbCr or RGBA.
+#endif
+
+#if SECOND_YCBCR_OUTPUT_PLANAR
+out vec4 Y2, Cb2, Cr2;
+#elif SECOND_YCBCR_OUTPUT_SPLIT_Y_AND_CBCR
+out vec4 Y2, Chroma2;
+#elif SECOND_YCBCR_OUTPUT_INTERLEAVED
+out vec4 YCbCr2;
+#endif
+
+#if YCBCR_ALSO_OUTPUT_RGBA
+out vec4 RGBA;
+#endif
+