public void OnCreate() { m_DeformedMeshData = new ComputeBufferWrapper <VertexData>("_DeformedMeshData", k_ChunkSize); m_SharedMeshBuffer = new ComputeBufferWrapper <VertexData>("_SharedMeshData", k_ChunkSize); m_DeformedMeshData.PushDataToGlobal(); }
public void OnCreate() { m_ComputeShader = Resources.Load <ComputeShader>("BlendShapeComputeShader"); Debug.Assert(m_ComputeShader != null, "BlendShapeCompute shader was not found!"); m_Kernel = m_ComputeShader.FindKernel("BlendShapeComputeKernel"); m_BlendShapeVertexBuffer = new ComputeBufferWrapper <BlendShapeVertexDelta>("_BlendShapeVertexDeltas", k_ChunkSize, m_ComputeShader); m_BlendShapeOffsetBuffer = new ComputeBufferWrapper <uint2>("_BlendShapeOffsetAndCount", k_ChunkSize, m_ComputeShader); m_BlendWeights = new ComputeBufferWrapper <float>("_BlendShapeWeights", k_ChunkSize); }
public void OnCreate() { #if ENABLE_COMPUTE_DEFORMATIONS m_ComputeShader = Resources.Load <ComputeShader>("SkinningComputeShader"); Debug.Assert(m_ComputeShader != null, "Compute shader was not found!"); m_Kernel = m_ComputeShader.FindKernel("SkinningComputeKernel"); m_SharedBoneWeightsBuffer = new ComputeBufferWrapper <BoneWeight>("_SharedMeshBoneWeights", k_ChunkSize, m_ComputeShader); m_InfluenceOffsetBuffer = new ComputeBufferWrapper <uint2>("_InfluencesOffsetAndCount", k_ChunkSize, m_ComputeShader); #endif m_SkinMatrices = new ComputeBufferWrapper <float3x4>("_SkinMatrices", k_ChunkSize); }