public static boolean isSwizzlable(String type) {
        return type.indexOf("vec4")>-1 || type.indexOf("vec3")>-1 || type.indexOf("vec2")>-1 || type.equals("float");
    }
returns true if a variable of the given type can have a swizzle

@param type the glsl type
@return true if a variable of the given type can have a swizzle
jme3-core/src/main/java/com/jme3/shader/ShaderUtils.java