浏览代码

Another try to get these shaders to compile correctly

/keypoint_self_occlusion
Steve Borkman 3 年前
当前提交
8e6c96e8
共有 2 个文件被更改,包括 6 次插入14 次删除
  1. 18
      com.unity.perception/Editor/GroundTruth/ShaderPreprocessor.cs
  2. 2
      com.unity.perception/Runtime/GroundTruth/Resources/KeypointDepthCheck.shader

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


#if HDRP_PRESENT || URP_PRESENT
#if HDRP_PRESENT
var enabled = new ShaderKeyword(shader, "HDRP_ENABLED");
var disabled = new ShaderKeyword(shader, "URP_ENABLED");
var keyword = new ShaderKeyword(shader, "HDRP_ENABLED");
var enabled = new ShaderKeyword(shader, "HDRP_DISABLED");
var disabled = new ShaderKeyword(shader, "HDRP_ENABLED");
var keyword = new ShaderKeyword(shader, "HDRP_DISABLED");
var skeys = data[i].shaderKeywordSet.GetShaderKeywords();
foreach (var s in skeys)
{
var txt = ShaderKeyword.GetGlobalKeywordName(s);
txt = ShaderKeyword.GetKeywordName(shader, s);
}
if (data[i].shaderKeywordSet.IsEnabled(keyword))
continue;
data[i].shaderKeywordSet.Enable(enabled);
data[i].shaderKeywordSet.Disable(disabled);
data.RemoveAt(i);
}
#endif
}

2
com.unity.perception/Runtime/GroundTruth/Resources/KeypointDepthCheck.shader


#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
//enable GPU instancing support
#pragma multi_compile __ HDRP_ENABLED
#pragma multi_compile HDRP_ENABLED HDRP_DISABLED
#pragma multi_compile_instancing
ENDHLSL

正在加载...
取消
保存