protected virtual void UpdateVertexBuffer() { if (cullingData == null) { cullingData = new CullingData(particleNum); } //_SetCommonParameterForCS(cullingCS); cullingData.Update(cullingCS, targetCamera, particleNum, particleBuffer, activeIndexBuffer); }
void UpdateVertexBuffer(Camera camera) { CullingData data = cameraDatas[camera]; if (data == null) { data = cameraDatas[camera] = new CullingData(particleNum); } data.Update(cullingCS, camera, particleNum, particleBuffer, activeIndexBuffer); }
protected override void UpdateVertexBuffer(Camera camera) { CullingData data = cameraDatas[camera]; if (data == null) { data = cameraDatas[camera] = new CullingData(particleNum); data.SetVertexCount(meshIndicesNum); } data.Update(cullingCS, camera, particleNum, particleBuffer, activeIndexBuffer); }
protected virtual void UpdateVertexBuffer(Camera camera) { CullingData data = cameraDatas[camera]; if (data == null) { data = cameraDatas[camera] = new CullingData(particleNum); } //_SetCommonParameterForCS(cullingCS); data.Update(cullingCS, camera, particleNum, particleBuffer, activeIndexBuffer); }
protected virtual void UpdateVertexBuffer(Camera camera) { CullingData data = cameraDatas[camera]; if (data == null) { data = cameraDatas[camera] = new CullingData(particleNum); data.SetVertexCount(1); // パーティクルなので頂点数は1 } data.Update(cullingCS, camera, particleNum, particleBuffer, activeIndexBuffer); }
// カメラごとのカリングデータの更新処理 private void UpdateCullingDatas(Camera _camera) { // カメラのカリングデータを取得 CullingData data = m_cameraDatas[_camera]; // カリングデータが見つかったか判定する if (data == null) { // カリングデータを設定 data = m_cameraDatas[_camera] = new CullingData(m_numParticles); data.SetVertexCount(m_numMeshIndices); } // カリングデータの更新処理 data.Update(_cullingComputeShader, _camera, m_numParticles, m_particlesBuffer, m_activeParticlesBuffer); }