예제 #1
0
 protected override void Awake()
 {
     VuforiaAbstractConfiguration.VideoBackgroundConfiguration videoBackground = VuforiaAbstractConfiguration.Instance.VideoBackground;
     this.mClippingMode           = videoBackground.ClippingMode;
     this.mMatteShader            = videoBackground.MatteShader;
     this.mVideoBackgroundEnabled = videoBackground.VideoBackgroundEnabled;
 }
예제 #2
0
 private void CheckForChangedClippingMode()
 {
     if (this.mVideoBgMgr == null)
     {
         return;
     }
     HideExcessAreaAbstractBehaviour.CLIPPING_MODE clippingMode = this.mVideoBgMgr.ClippingMode;
     if (clippingMode == this.mClippingMode)
     {
         return;
     }
     this.mClippingMode = clippingMode;
     if (this.mClippingImpl != null)
     {
         this.mClippingImpl.OnDestroy();
     }
     this.mStarted = false;
     HideExcessAreaAbstractBehaviour.CLIPPING_MODE cLIPPING_MODE = this.mClippingMode;
     if (cLIPPING_MODE == HideExcessAreaAbstractBehaviour.CLIPPING_MODE.STENCIL)
     {
         this.mClippingImpl = new StencilHideExcessAreaClipping(base.gameObject, this.mVideoBgMgr.MatteShader);
         return;
     }
     if (cLIPPING_MODE != HideExcessAreaAbstractBehaviour.CLIPPING_MODE.PLANES)
     {
         this.mClippingImpl = new NullHideExcessAreaClipping();
         return;
     }
     this.mClippingImpl = new LegacyHideExcessAreaClipping(base.gameObject, this.mVideoBgMgr.MatteShader);
 }
예제 #3
0
 public static Shader GetDefaultMatteShader(HideExcessAreaAbstractBehaviour.CLIPPING_MODE mode)
 {
     if (mode == HideExcessAreaAbstractBehaviour.CLIPPING_MODE.STENCIL)
     {
         return(Shader.Find("ClippingMask"));
     }
     if (mode != HideExcessAreaAbstractBehaviour.CLIPPING_MODE.PLANES)
     {
         return(null);
     }
     return(Shader.Find("DepthMask"));
 }
 public override void DrawInspectorGUI()
 {
     EditorGUILayout.PropertyField(this.mVideoBackgroundEnabled, new GUIContent("Enable video background"), new GUILayoutOption[0]);
     HideExcessAreaAbstractBehaviour.CLIPPING_MODE cLIPPING_MODE = (HideExcessAreaAbstractBehaviour.CLIPPING_MODE) this.mClippingMode.enumValueIndex;
     EditorGUILayout.PropertyField(this.mClippingMode, new GUIContent("Overflow geometry"), new GUILayoutOption[0]);
     HideExcessAreaAbstractBehaviour.CLIPPING_MODE enumValueIndex = (HideExcessAreaAbstractBehaviour.CLIPPING_MODE) this.mClippingMode.enumValueIndex;
     if (cLIPPING_MODE != enumValueIndex)
     {
         cLIPPING_MODE = enumValueIndex;
         this.mMatteShader.objectReferenceValue = VuforiaAbstractConfiguration.VideoBackgroundConfiguration.GetDefaultMatteShader(cLIPPING_MODE);
     }
     if (cLIPPING_MODE != HideExcessAreaAbstractBehaviour.CLIPPING_MODE.NONE)
     {
         EditorGUILayout.PropertyField(this.mMatteShader, new GUIContent("Matte Shader"), new GUILayoutOption[0]);
     }
 }
예제 #5
0
 public void SetClippingMode(HideExcessAreaAbstractBehaviour.CLIPPING_MODE value)
 {
     this.mClippingMode = value;
 }