void UpdateMaterialProperties()
		{
			outputMaterial.SetTextureOffset("_MainTex", offset);
			outputMaterial.SetTextureScale("_MainTex", tiling);
			if (outputTexture != null)
				outputMaterial.SetTexture("_MainTex", outputTexture);
			matPreview.SetMaterial(outputMaterial);
		}
        public override void OnNodeGUI()
        {
            GUILayout.Space(EditorGUIUtility.singleLineHeight);

            EditorGUI.BeginChangeCheck();
            outputMaterial = EditorGUILayout.ObjectField(outputMaterial, typeof(Material), false) as Material;
            if (EditorGUI.EndChangeCheck())
            {
                matPreview.SetMaterial(outputMaterial);
            }

            EditorGUI.BeginChangeCheck();
            showSceneHiddenObjects = EditorGUILayout.Toggle("Show scene hidden objects", showSceneHiddenObjects);
            if (EditorGUI.EndChangeCheck())
            {
                matPreview.UpdateShowSceneHiddenObjects(showSceneHiddenObjects);
            }

            if ((showPreview = EditorGUILayout.Foldout(showPreview, "preview")))
            {
                matPreview.Render();
            }
        }