比较提交

...

3 次代码提交

作者 SHA1 备注 提交日期
Steven Borkman 23a67102 Merge remote-tracking branch 'origin/aisv754_seg_alpha_bug' into aisv754_seg_alpha_bug 4 年前
Steven Borkman 61ff26b3 Segmentation Alpha Bug Fix 4 年前
Steven Borkman fac9b16d Segmentation Alpha Bug Fix 4 年前
共有 1 个文件被更改,包括 5 次插入13 次删除
  1. 18
      com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/SegRemoveBackgroundShader.shader

18
com.unity.perception/Runtime/GroundTruth/Labelers/Visualization/Resources/SegRemoveBackgroundShader.shader


Shader "Perception/SegRemoveBackgroundShader"
Shader "Perception/SegRemoveBackgroundShader"
{
Properties
{

// sample the texture
fixed4 col = tex2D(_MainTex, i.uv);
if (abs(col.r - _RemoveColor.r) < .01f)
{
if (abs(col.g - _RemoveColor.g) < .01f)
{
if (abs(col.b - _RemoveColor.b) < .01f)
{
col.a = _BackTransparency;
}
}
}
if (abs(col.a - _BackTransparency) > .01f) col.a = _SegmentTransparency;
if (abs(col.r - _RemoveColor.r) < .001f && abs(col.g - _RemoveColor.g) < .001f && abs(col.b - _RemoveColor.b) < .001f)
col.a = _BackTransparency;
else
col.a = _SegmentTransparency;
return col;
}

正在加载...
取消
保存