toJSON(obj) {
        var json = MaterialSerializer.prototype.toJSON.call(this, obj);

        json.defines = obj.defines;
        json.uniforms = new UniformsSerializer().toJSON(obj.uniforms);
        json.vertexShader = obj.vertexShader;
        json.fragmentShader = obj.fragmentShader;

        return json;
    }
RawShaderMaterialSerializer
@author tengge / https://github.com/tengge1