<!-- NEW1 — TEST 1 · THE LIVING DISTRICT · part 200 -->
		if ( Object.keys( this.defines ).length > 0 ) data.defines = this.defines;

		data.vertexShader = this.vertexShader;
		data.fragmentShader = this.fragmentShader;

		data.lights = this.lights;
		data.clipping = this.clipping;

		const extensions = {};

		for ( const key in this.extensions ) {

			if ( this.extensions[ key ] === true ) extensions[ key ] = true;

		}

		if ( Object.keys( extensions ).length > 0 ) data.extensions = extensions;

		return data;

	}

	/**
	 * Deserializes the material from the given JSON.
	 *
	 * @param {Object} json - The JSON holding the serialized material.
	 * @param {Object<string,Texture>} textures - A dictionary holding textures referenced by the material.
	 * @return {ShaderMaterial} A reference to this material.
	 */
	fromJSON( json, textures ) {

		super.fromJSON( json, textures );

		if ( json.uniforms !== undefined ) {

			for ( const name in json.uniforms ) {

				const uniform = json.uniforms[ name ];

				this.uniforms[ name ] = {};

				switch ( uniform.type ) {

					case 't':
						this.uniforms[ name ].value = textures[ uniform.value ] || null;
						break;

					case 'c':
						this.uniforms[ name ].value = new Color().setHex( uniform.value );
						break;

					case 'v2':
						this.uniforms[ name ].value = new Vector2().fromArray( uniform.value );
						break;

					case 'v3':
						this.uniforms[ name ].value = new Vector3().fromArray( uniform.value );
						break;

					case 'v4':
						this.uniforms[ name ].value = new Vector4().fromArray( uniform.value );
						break;

					case 'm3':
						this.uniforms[ name ].value = new Matrix3().fromArray( uniform.value );
						break;

					case 'm4':
						this.uniforms[ name ].value = new Matrix4().fromArray( uniform.value );
						break;

					default:
						this.uniforms[ name ].value = uniform.value;

				}

			}

		}

		if ( json.defines !== undefined ) this.defines = json.defines;
		if ( json.vertexShader !== undefined ) this.vertexShader = json.vertexShader;
		if ( json.fragmentShader !== undefined ) this.fragmentShader = json.fragmentShader;
		if ( json.glslVersion !== undefined ) this.glslVersion = json.glslVersion;

		if ( json.extensions !== undefined ) {

			for ( const key in json.extensions ) {

				this.extensions[ key ] = json.extensions[ key ];

			}

		}

		if ( json.lights !== undefined ) this.lights = json.lights;
		if ( json.clipping !== undefined ) this.clipping = json.clipping;

		return this;

	}

}

/**
 * This class works just like {@link ShaderMaterial}, except that definitions
 * of built-in uniforms and attributes are not automatically prepended to the
 * GLSL shader code.
 *
 * `RawShaderMaterial` can only be used with {@link WebGLRenderer}.
 *
 * @augments ShaderMaterial
 */
class RawShaderMaterial extends ShaderMaterial {

	/**
	 * Constructs a new raw shader material.
	 *
	 * @param {Object} [parameters] - An object with one or more properties
	 * defining the material's appearance. Any property of the material
	 * (including any property from inherited materials) can be passed
	 * in here. Color values can be passed any type of value accepted
	 * by {@link Color#set}.
	 */
	constructor( parameters ) {

		super( parameters );

		/**
		 * This flag can be used for type testing.
		 *
		 * @type {boolean}
		 * @readonly
		 * @default true
		 */
		this.isRawShaderMaterial = true;

		this.type = 'RawShaderMaterial';

	}

}

/**
 * A standard physically based material, using Metallic-Roughness workflow.
 *
 * Physically based rendering (PBR) has recently become the standard in many
 * 3D applications, such as [Unity](https://blogs.unity3d.com/2014/10/29/physically-based-shading-in-unity-5-a-primer/),
 * [Unreal](https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/) and
 * [3D Studio Max](http://area.autodesk.com/blogs/the-3ds-max-blog/what039s-new-for-rendering-in-3ds-max-2017).
 *
 * This approach differs from older approaches in that instead of using
 * approximations for the way in which light interacts with a surface, a
 * physically correct model is used. The idea is that, instead of tweaking
 * materials to look good under specific lighting, a material can be created
 * that will react 'correctly' under all lighting scenarios.
 *
 * In practice this gives a more accurate and realistic looking result than
 * the {@link MeshLambertMaterial} or {@link MeshPhongMaterial}, at the cost of
 * being somewhat more computationally expensive. `MeshStandardMaterial` uses per-fragment
 * shading.
 *
 * Note that for best results you should always specify an environment map when using this material.
 *
 * For a non-technical introduction to the concept of PBR and how to set up a
 * PBR material, check out these articles by the people at [marmoset](https://www.marmoset.co):
 *
 * - [Basic Theory of Physically Based Rendering](https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/)
 * - [P