public bool ResizePassBufferIfRequired(int requiredSize)
        {
            var size = m_BlendWeights.BufferSize;

            if (size <= requiredSize || size - requiredSize > k_ChunkSize)
            {
                var newSize = ((requiredSize / k_ChunkSize) + 1) * k_ChunkSize;
                m_BlendWeights.Resize(newSize);
                return(true);
            }

            return(false);
        }
        public bool ResizeSharedMeshBuffersIfRequired(int requiredSize)
        {
            var size = m_SharedMeshBuffer.BufferSize;

            if (size <= requiredSize || size - requiredSize > k_ChunkSize)
            {
                var newSize = ((requiredSize / k_ChunkSize) + 1) * k_ChunkSize;
                m_SharedMeshBuffer.Resize(newSize);
                return(true);
            }

            return(false);
        }
        public bool ResizeAndPushDeformMeshBuffersIfRequired(int requiredSize)
        {
            var size = m_DeformedMeshData.BufferSize;

            if (size <= requiredSize || size - requiredSize > k_ChunkSize)
            {
                var newSize = ((requiredSize / k_ChunkSize) + 1) * k_ChunkSize;
                m_DeformedMeshData.Resize(newSize);
                m_DeformedMeshData.PushDataToGlobal();
                return(true);
            }

            return(false);
        }
        public bool ResizeSharedBufferIfRequired(int requiredBlendShapeVertexSize, int requiredVertexSize)
        {
            var resized        = false;
            var blendShapeSize = m_BlendShapeVertexBuffer.BufferSize;

            if (blendShapeSize <= requiredBlendShapeVertexSize || blendShapeSize - requiredBlendShapeVertexSize > k_ChunkSize)
            {
                var newSize = ((requiredBlendShapeVertexSize / k_ChunkSize) + 1) * k_ChunkSize;
                m_BlendShapeVertexBuffer.Resize(newSize);
                resized = true;
            }

            var vertexSize = m_BlendShapeOffsetBuffer.BufferSize;

            if (vertexSize <= requiredVertexSize || vertexSize - requiredVertexSize > k_ChunkSize)
            {
                var newSize = ((requiredVertexSize / k_ChunkSize) + 1) * k_ChunkSize;
                m_BlendShapeOffsetBuffer.Resize(newSize);
                resized = true;
            }

            return(resized);
        }
        public bool ResizeSharedBufferIfRequired(int requiredBoneWeightsSize, int requiredVertexSize)
        {
            bool didResize = false;

            var offsetBufferSize = m_InfluenceOffsetBuffer.BufferSize;

            if (offsetBufferSize <= requiredVertexSize || offsetBufferSize - requiredVertexSize > k_ChunkSize)
            {
                var newVertexSize = ((requiredVertexSize / k_ChunkSize) + 1) * k_ChunkSize;
                m_InfluenceOffsetBuffer.Resize(newVertexSize);
                didResize = true;
            }

            var boneWeightsSize = m_SharedBoneWeightsBuffer.BufferSize;

            if (boneWeightsSize <= requiredBoneWeightsSize || boneWeightsSize - requiredBoneWeightsSize > k_ChunkSize)
            {
                var newBoneWeightsSize = ((requiredBoneWeightsSize / k_ChunkSize) + 1) * k_ChunkSize;
                m_SharedBoneWeightsBuffer.Resize(newBoneWeightsSize);
                didResize = true;
            }

            return(didResize);
        }