浏览代码

Cleaning up commented out code

/keypoint_self_occlusion
Jon Hogins 3 年前
当前提交
c79375ca
共有 3 个文件被更改,包括 0 次插入45 次删除
  1. 2
      com.unity.perception/Runtime/GroundTruth/Labelers/KeypointLabeler.cs
  2. 3
      com.unity.perception/Editor/GroundTruth/ShaderPreprocessor.cs.meta
  3. 40
      com.unity.perception/Editor/GroundTruth/ShaderPreprocessor.cs

2
com.unity.perception/Runtime/GroundTruth/Labelers/KeypointLabeler.cs


var positionsPixeldata = new NativeArray<half>(textureDimensions.x * textureDimensions.y * 2, Allocator.Temp);
var depthPixeldata = new NativeArray<half>(textureDimensions.x * textureDimensions.y, Allocator.Temp);
//var depthTexture = Shader.GetGlobalTexture("_CameraDepthTexture");
for (int i = 0; i < checkLocations.Length; i++)
{

m_MaterialDepthCheck.SetTexture("_Positions", m_KeypointPositionsTexture);
m_MaterialDepthCheck.SetTexture("_KeypointCheckDepth", m_KeypointCheckDepthTexture);
//m_MaterialDepthCheck.SetTexture("_CameraDepthTexture", depthTexture);
commandBuffer.Blit(null, m_ResultsBuffer, m_MaterialDepthCheck);
scriptableRenderContext.ExecuteCommandBuffer(commandBuffer);

3
com.unity.perception/Editor/GroundTruth/ShaderPreprocessor.cs.meta


fileFormatVersion: 2
guid: 2156803809034108bf01e9ab96302a9f
timeCreated: 1619623320

40
com.unity.perception/Editor/GroundTruth/ShaderPreprocessor.cs


// using System.Collections.Generic;
// using System.Linq;
// using UnityEditor.Build;
// using UnityEditor.Rendering;
// using UnityEngine;
// using UnityEngine.Rendering;
//
// namespace UnityEditor.Perception.GroundTruth
// {
// public class ShaderPreprocessor : IPreprocessShaders
// {
// private string[] shadersToPreprocess = new[]
// {
// "Perception/KeypointDepthCheck"
// };
// public int callbackOrder => 0;
// public void OnProcessShader(Shader shader, ShaderSnippetData snippet, IList<ShaderCompilerData> data)
// {
// if (!shadersToPreprocess.Contains(shader.name))
// return;
//
// var hdrpKeyword = new ShaderKeyword(shader, "HDRP_ENABLED");
// #if HDRP_PRESENT || URP_PRESENT
//
// #if HDRP_PRESENT
// bool isHdrp = true;
// #else
// bool isHdrp = false;
// #endif
// for (var i = data.Count - 1; i >= 0; --i)
// {
// if (data[i].shaderKeywordSet.IsEnabled(hdrpKeyword) == isHdrp)
// continue;
//
// data.RemoveAt(i);
// }
// #endif
// }
// }
// }
正在加载...
取消
保存