示例#1
0
 public override void RebuildMeshInfoForComputeShader(ref DanbiBaseShapeData dat)
 {
     m_cylinderShape.local2World = transform.localToWorldMatrix;
     m_cylinderShape.world2Local = transform.worldToLocalMatrix;
     m_cylinderShape.specular    = new Vector3(0.9f, 0.9f, 0.9f);
     m_cylinderShape.emission    = new Vector3(-1.0f, -1.0f, -1.0f);
     dat = m_cylinderShape;
 }
示例#2
0
        public override void RebuildMeshInfoForComputeShader(ref DanbiBaseShapeData shapesData)
        {
            m_domeShape.local2World = transform.localToWorldMatrix;
            m_domeShape.world2Local = transform.worldToLocalMatrix;
            m_domeShape.specular    = new Vector3(1.0f, 1.0f, 1.0f);
            m_domeShape.emission    = new Vector3(0.0f, 0.0f, 0.0f);

            float h     = m_height;
            float dr    = m_bottomRadius;
            float ratio = m_maskingRatio;

            // Debug.Log($"masking ratio : {ratio}");

            m_domeShape.radius     = ((h * h) + (dr * dr)) / (2 * h);
            m_domeShape.usedHeight = (1.0f - ratio) * h;

            shapesData = m_domeShape;
        }
示例#3
0
 public virtual void RebuildMeshInfoForComputeShader(ref DanbiBaseShapeData shapesData)
 {
     //
 }