Neodroid  0.2.0
Machine Learning Environment Prototyping Tool
ObsoleteSegmenter.cs
Go to the documentation of this file.
1 using UnityEngine;
2 
3 namespace droid.Runtime.Utilities.GameObjects.NeodroidCamera.Segmentation.Obsolete {
7  public abstract class ObsoleteSegmenter : Segmenter {
11  protected int _Default_Color_Tag = Shader.PropertyToID("_Color");
12 
13  protected int _Segmentation_Color_Tag = Shader.PropertyToID("_SegmentationColor");
14  protected int _Outline_Color_Tag = Shader.PropertyToID("_OutlineColor");
15  protected int _Outline_Width_Factor_Tag = Shader.PropertyToID("_OutlineWidthFactor");
16 
17  [SerializeField, Range(0, 2)] protected float _Outline_Width_Factor = 0.05f;
18  [SerializeField] protected Color _Outline_Color = Color.magenta;
19 
20  public Color OutlineColor { get { return this._Outline_Color; } }
21 
22  void OnPreRender() {
23  // change
24  this.Change();
25  }
26 
27  protected abstract void Change();
28 
29  /*void OnPreCull() {
30  // change
31 }*/
34  void OnPostRender() {
35  // change back
36  this.Restore();
37  }
38 
39  protected abstract void Restore();
40  }
41 }