public void clearValue(){
        updateNeeded = true;

        if (multiData != null){
            multiData.clear();

            while (multiData.remaining() > 0){
                ZERO_BUF.clear();
                ZERO_BUF.limit(Math.min(multiData.remaining(), 16));
                multiData.put(ZERO_BUF);
            }

            multiData.clear();

            return;
        }

        if (varType == null) {
            return;
        }

        switch (varType){
            case Int:
                this.value = ZERO_INT;
                break;
            case Boolean:
                this.value = Boolean.FALSE;
                break;
            case Float:
                this.value = ZERO_FLT;
                break;
            case Vector2:
                if (this.value != null) {
                    ((Vector2f) this.value).set(Vector2f.ZERO);
                }
                break;
            case Vector3:
                if (this.value != null) {
                    ((Vector3f) this.value).set(Vector3f.ZERO);
                }
                break;
            case Vector4:
                if (this.value != null) {
                    if (this.value instanceof ColorRGBA) {
                        ((ColorRGBA) this.value).set(ColorRGBA.BlackNoAlpha);
                    } else if (this.value instanceof Vector4f) {
                        ((Vector4f) this.value).set(Vector4f.ZERO);
                    } else {
                        ((Quaternion) this.value).set(Quaternion.ZERO);
                    }
                }
                break;
            default:
                // won't happen because those are either textures
                // or multidata types
        }
    }
Used to track which uniforms to clear to avoid
values leaking from other materials that use that shader.
jme3-core/src/main/java/com/jme3/shader/Uniform.java