public void setTextureParam(String name, VarType type, Texture value) {
        if (value == null) {
            throw new IllegalArgumentException();
        }

        checkSetParam(type, name);
        MatParamTexture param = getTextureParam(name);

        checkTextureParamColorSpace(name, value);
        ColorSpace colorSpace = value.getImage() != null ? value.getImage().getColorSpace() : null;

        if (param == null) {
            param = new MatParamTexture(type, name, value, colorSpace);
            paramValues.put(name, param);
        } else {
            param.setTextureValue(value);
            param.setColorSpace(colorSpace);
        }

        if (technique != null) {
            technique.notifyParamChanged(name, type, value);
        }

        // need to recompute sort ID
        sortingId = -1;
    }
Set a texture parameter.

@param name The name of the parameter
@param type The variable type {@link VarType}
@param value The texture value of the parameter.

@throws IllegalArgumentException is value is null
jme3-core/src/main/java/com/jme3/material/Material.java