protected void updateRightTypeFromLeftType(VariableMapping mapping) {
        String type = mapping.getLeftVariable().getType();
        int card = ShaderUtils.getCardinality(type, mapping.getRightSwizzling());
        if (card > 0) {
            if (card == 1) {
                type = "float";
            } else {
                type = "vec" + card;
            }
        }
        mapping.getRightVariable().setType(type);
    }
Updates the type of the right variable of a mapping from the type of the
left variable.

@param mapping the mapping to consider.
jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java