예제 #1
0
    private void Log04CopyInstanceData()
    {
        if (m_debugLog != DebugLog.AfterCopyInstanceData)
        {
            return;
        }
        m_debugLog = DebugLog.DontLog;

        StringBuilder sb = new StringBuilder();

        ComputeShaderOutputData[] culledInstancesData = new ComputeShaderOutputData[m_numberOfInstances];
        m_culledInstanceBuffer.GetData(culledInstancesData);
        sb.AppendLine("04 culledInstances:");
        for (int i = 0; i < culledInstancesData.Length; i++)
        {
            sb.AppendLine(i + ": " + culledInstancesData[i].position + " " + culledInstancesData[i].rotation + ": " + culledInstancesData[i].uniformScale);
        }
        Debug.Log(sb.ToString());

        // uint[] drawcallIDData = new uint[m_totalNumOfInstances];
        // m_culledDrawcallIDBuffer.GetData(drawcallIDData);
        // string drawcallIDText = "04 drawcallIDData:\n";
        // for (int i = 0; i < drawcallIDData.Length; i++)
        // {
        //  drawcallIDText += i + ": " + drawcallIDData[i] + "\n";
        // }
        // Debug.Log(drawcallIDText);
    }
예제 #2
0
    private void Log04CopyInstanceData()
    {
        if (m_debugLog != DebugLog.AfterCopyInstanceData)
        {
            return;
        }
        m_debugLog = DebugLog.DontLog;

        StringBuilder sb = new StringBuilder();

        ComputeShaderOutputData[] culledInstancesData = new ComputeShaderOutputData[m_numberOfInstances];
        m_culledInstanceBuffer.GetData(culledInstancesData);
        sb.AppendLine("04 culledInstances:");
        for (int i = 0; i < culledInstancesData.Length; i++)
        {
            sb.AppendLine(i + ": " + culledInstancesData[i].position + " " + culledInstancesData[i].rotation + ": " + culledInstancesData[i].uniformScale);
        }
        Debug.Log(sb.ToString());
    }