|
|
|
|
|
|
mpb.SetVector(k_LabelingId, found ? entry.color : Color.black); |
|
|
|
|
|
|
|
Texture mainTex = null; |
|
|
|
var mainTexSt = new Vector4(1, 1, 0, 0); |
|
|
|
mainTex = renderer.material.GetTexture("_MainTex"); |
|
|
|
var mat = renderer.material; |
|
|
|
mainTex = mat.GetTexture("_MainTex"); |
|
|
|
mainTexSt.x = mat.mainTextureScale.x; |
|
|
|
mainTexSt.y = mat.mainTextureScale.y; |
|
|
|
mainTexSt.z = mat.mainTextureOffset.x; |
|
|
|
mainTexSt.w = mat.mainTextureOffset.y; |
|
|
|
|
|
|
|
// if (maintex)
|
|
|
|
// mpb.SetTexture("_MainTex", renderer.material.GetTexture("_MainTex"));
|
|
|
|
} |
|
|
|
|
|
|
if (mainTex == null) |
|
|
|
Debug.LogError("No texture found on object"); |
|
|
|
else |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
mpb.SetVector("_MainTex_ST", mainTexSt); |
|
|
|
} |
|
|
|
//mpb.SetFloat("_TransparencyThreshold", segBeh.opacityThreshold);
|
|
|
|
} |
|
|
|