         int primOffset = (gl_PrimitiveID + OsdPrimitiveIdBase) * 4;     \
         for (int i = 0; i < 4; ++i) {                                   \
             int index = (primOffset+i)*OSD_FVAR_WIDTH + fvarOffset;     \
-            v[i] = vec3(texelFetch(OsdFVarDataBuffer, index).s,         \
+            v[i] = vec4(texelFetch(OsdFVarDataBuffer, index).s,         \
                         texelFetch(OsdFVarDataBuffer, index + 1).s,     \
                         texelFetch(OsdFVarDataBuffer, index + 2).s,     \
                         texelFetch(OsdFVarDataBuffer, index + 3).s);    \

        result = mix(mix(v[0], v[1], tessCoord.s),                      \
                     mix(v[3], v[2], tessCoord.s),                      \
                     tessCoord.t);                                      \
    }

// ----------------------------------------------------------------------------

#define OSD_FVAR_WIDTH 0
#endif

// ------ extract from quads (catmark, bilinear) ---------
// XXX: only linear interpolation is supported

#define OSD_COMPUTE_FACE_VARYING_1(result, fvarOffset, tessCoord)       \
    {                                                                   \
        float v[4];                                                     \
