 		
 		override protected function computeHash() : uint
 		{
-			var textureResourceId : int = RESOURCES.indexOf(_textureResource);
+			var textureResourceId : uint = RESOURCE_ID[_textureResource];
 			
-			if (textureResourceId === -1)
+			if (!textureResourceId)
 			{
-				RESOURCES.push(textureResource);
-				textureResourceId = RESOURCES.length - 1;
+				RESOURCE_ID[_textureResource] = ++_lastId;
+				textureResourceId = _lastId;
 			}
 			
 			return CRC32.computeForString('Sampler' + textureResourceId)

	import aerys.minko.render.resource.texture.TextureResource;
	import aerys.minko.render.shader.compiler.CRC32;
	import aerys.minko.render.shader.compiler.graph.nodes.AbstractNode;
	
	/**
	 * @private

		/**
		 * This vector is only used to compute the hash of the Sampler. 
		 */		
		private static const RESOURCE_ID  : Dictionary    = new Dictionary(true);
        
        private static var _lastId          : uint          = 0;
		
		private var _textureResource : ITextureResource;
		
