private void cityNoiseWork( int jobId, int jobCount )
		{
			int tileSize			= ( _width / _tileCountX );

			CityTileRect tileRect	= new CityTileRect();
			tileRect.minx			= ( jobId % _tileCountX ) * tileSize;
			tileRect.maxx			= tileRect.minx + tileSize;
			tileRect.miny			= ( jobId / _tileCountX ) * tileSize;
			tileRect.maxy			= tileRect.miny + tileSize;

#if true
			for( int i = 0; i < _citySplatList.Count; ++i )
			{
				CitySplatData citySplat = _citySplatList[ i ];
				
				int intSpread			= Mathf.RoundToInt( citySplat.spread );

				float spreadTop			= ( 0.5f - getSphericalDistortion( citySplat.y - intSpread ) ) * 2f;
				float spreadBottom		= ( 0.5f - getSphericalDistortion( citySplat.y + intSpread ) ) * 2f;

				float spreadDistortion;

				if( spreadTop <= 0f || spreadBottom <= 0f )
					spreadDistortion = _width * 0.5f;
				else
					spreadDistortion = Mathf.Min( citySplat.spread / Mathf.Min( spreadTop, spreadBottom ), _width * 0.5f );

				int intSpreadDistortion	= Mathf.RoundToInt( spreadDistortion );

				float expFalloff		= 1f / Mathf.Exp( _cityFalloff );
				float invSpread			= 1f / citySplat.spread;

				int minx				= Mathf.Max( tileRect.minx, citySplat.x - intSpreadDistortion );
				int maxx				= Mathf.Min( tileRect.maxx, citySplat.x + intSpreadDistortion + 1 );

				int miny				= Mathf.Max( tileRect.miny, citySplat.y - intSpread );
				int maxy				= Mathf.Min( tileRect.maxy, citySplat.y + intSpread + 1 );

				float referenceWidth	= 8192f;
				float referenceHeight	= referenceWidth * 0.5f;

				for( int a = minx; a < maxx; ++a )
				{
					float iDistortion	= ( ( citySplat.x - a ) / spreadDistortion ) * citySplat.spread + citySplat.x;
					float xi			= ( citySplat.x - iDistortion ) * ( citySplat.x - iDistortion );
					xi					= ( xi / _width ) * referenceWidth;

					for( int b = miny; b < maxy; ++b )
					{
						float xj				= ( citySplat.y - b ) * ( citySplat.y - b );
						xj						= ( xj / _height ) * referenceHeight;
						float dist				= Mathf.Max( citySplat.spread - Mathf.Sqrt( xi + xj ), 0f ) * invSpread;

						int index				= getIndex( a, b );

						float diffuseMultiplier	= diffuseData[ _diffuseStartIndexC + index ] / 255f;
						
						float val				= cityData[ index ] / diffuseMultiplier;
						val						+= ( ( citySplat.intensity * dist ) * expFalloff ) * dist;
					
						cityData[ index ]		= Mathf.Min( val, _cityMaxIntensity ) * diffuseMultiplier;
					}
				}
			}
#endif
		}
		private void cityNoiseWork( int jobId, int jobCount )
		{
			int tileSize			= ( _width / _tileCountX );

			CityTileRect tileRect	= new CityTileRect();
			tileRect.minx			= ( jobId % _tileCountX ) * tileSize;
			tileRect.maxx			= tileRect.minx + tileSize;
			tileRect.miny			= ( jobId / _tileCountX ) * tileSize;
			tileRect.maxy			= tileRect.miny + tileSize;

#if true
			for( int i = 0; i < _citySplatList.Count; ++i )
			{
				CitySplatData citySplat = _citySplatList[ i ];
				
				int intSpread			= Mathf.RoundToInt( citySplat.spread );

				float spreadTop			= ( 0.5f - getSphericalDistortion( citySplat.y - intSpread ) ) * 2f;
				float spreadBottom		= ( 0.5f - getSphericalDistortion( citySplat.y + intSpread ) ) * 2f;

				float spreadDistortion;

				if( spreadTop <= 0f || spreadBottom <= 0f )
					spreadDistortion = _width * 0.5f;
				else
					spreadDistortion = Mathf.Min( citySplat.spread / Mathf.Min( spreadTop, spreadBottom ), _width * 0.5f );

				int intSpreadDistortion	= Mathf.RoundToInt( spreadDistortion );

				float expFalloff		= 1f / Mathf.Exp( _cityFalloff );
				float invSpread			= 1f / citySplat.spread;

				int minx				= Mathf.Max( tileRect.minx, citySplat.x - intSpreadDistortion );
				int maxx				= Mathf.Min( tileRect.maxx, citySplat.x + intSpreadDistortion + 1 );

				int miny				= Mathf.Max( tileRect.miny, citySplat.y - intSpread );
				int maxy				= Mathf.Min( tileRect.maxy, citySplat.y + intSpread + 1 );

				float referenceWidth	= 8192f;
				float referenceHeight	= referenceWidth * 0.5f;

				for( int a = minx; a < maxx; ++a )
				{
					float iDistortion	= ( ( citySplat.x - a ) / spreadDistortion ) * citySplat.spread + citySplat.x;
					float xi			= ( citySplat.x - iDistortion ) * ( citySplat.x - iDistortion );
					xi					= ( xi / _width ) * referenceWidth;

					for( int b = miny; b < maxy; ++b )
					{
						float xj				= ( citySplat.y - b ) * ( citySplat.y - b );
						xj						= ( xj / _height ) * referenceHeight;
						float dist				= Mathf.Max( citySplat.spread - Mathf.Sqrt( xi + xj ), 0f ) * invSpread;

						int index				= getIndex( a, b );

						float diffuseMultiplier	= diffuseData[ _diffuseStartIndexC + index ] / 255f;
						
						float val				= cityData[ index ] / diffuseMultiplier;
						val						+= ( ( citySplat.intensity * dist ) * expFalloff ) * dist;
					
						cityData[ index ]		= Mathf.Min( val, _cityMaxIntensity ) * diffuseMultiplier;
					}
				}
			}
#endif
		}