function painterSortStable( a, b ) {

	if ( a.groupOrder !== b.groupOrder ) {

		return a.groupOrder - b.groupOrder;

	} else if ( a.renderOrder !== b.renderOrder ) {

		return a.renderOrder - b.renderOrder;

	} else if ( a.z !== b.z ) {

		return a.z - b.z;

	} else {

		return a.id - b.id;

	}

}
Default sorting function for opaque render items.

@private
@function
@param {Object} a - The first render item.
@param {Object} b - The second render item.
@return {number} A numeric value which defines the sort order.