Exemplo n.º 1
0
        protected override void DrawSettings()
        {
            VrtpStyles.BeginSectionBox(); {
                VrtpEditorUtils.ToggleProperty(_pDrawSkybox, null, VrtpStyles.sectionHeader);
                if (_tm.drawSkybox)
                {
                    ++EditorGUI.indentLevel;
                    EditorGUILayout.PropertyField(_pApplyColorToBkg, _gcApplyColor);
                    EditorGUILayout.PropertyField(_pFxSkybox);
                    --EditorGUI.indentLevel;
                }
            } VrtpStyles.EndSectionBox();

            VrtpStyles.BeginSectionBox(); {
                VrtpEditorUtils.ToggleProperty(_pDrawBeforeTransparent, null, VrtpStyles.sectionHeader);
            } VrtpStyles.EndSectionBox();

            VrtpStyles.BeginSectionBox(); {
                VrtpEditorUtils.ToggleProperty(_pUseMask, null, VrtpStyles.sectionHeader);
                if (_tm.useMask)
                {
                    ++EditorGUI.indentLevel;
                    EditorGUILayout.PropertyField(_pStencilRef);
                    EditorGUILayout.PropertyField(_pStencilMask);
                    EditorGUILayout.PropertyField(_pStencilBias);
                    EditorGUILayout.HelpBox("Mask may stress drawcalls and fillrate.", MessageType.Warning);
                    --EditorGUI.indentLevel;
                }
            } VrtpStyles.EndSectionBox();

            if (!_tm.irisZRejectionEnabled)
            {
                EditorGUILayout.HelpBox("Z-Rejection fillrate optimisation disabled", MessageType.Warning);
            }

            DrawMotionSettings();
        }
        protected void DrawMotionSettings()
        {
            #region Detection
            VrtpStyles.BeginSectionBox(); {
                ++EditorGUI.indentLevel;
                _showMotionDetection.active = EditorGUILayout.Foldout(_showMotionDetection, "Motion Detection", VrtpStyles.sectionFoldout);
                --EditorGUI.indentLevel;
                if (_showMotionDetection)
                {
                    EditorGUILayout.Space();

                    #region Angular Velocity
                    VrtpStyles.BeginChildBox(); {
                        VrtpEditorUtils.ToggleProperty(_pAvUse, _pAvUse.content, VrtpStyles.sectionHeader);
                        if (_tb.useAngularVelocity)
                        {
                            ++EditorGUI.indentLevel;
                            EditorGUILayout.PropertyField(_pAvStr, _gcAvStr);
                            EditorGUILayout.PropertyField(_pAvMin, _gcAvMin);
                            EditorGUILayout.PropertyField(_pAvMax, _gcAvMax);
                            EditorGUILayout.PropertyField(_pAvSmooth, _gcAvSmooth);
                            --EditorGUI.indentLevel;
                        }
                    } VrtpStyles.EndChildBox();
                    #endregion

                    #region Linear Acceleration
                    VrtpStyles.BeginChildBox(); {
                        VrtpEditorUtils.ToggleProperty(_pLaUse, _pLaUse.content, VrtpStyles.sectionHeader);
                        if (_tb.useAcceleration)
                        {
                            ++EditorGUI.indentLevel;
                            EditorGUILayout.PropertyField(_pLaStr, _gcLaStr);
                            EditorGUILayout.PropertyField(_pLaMin, _gcLaMin);
                            EditorGUILayout.PropertyField(_pLaMax, _gcLaMax);
                            EditorGUILayout.PropertyField(_pLaSmooth, _gcLaSmooth);
                            --EditorGUI.indentLevel;
                        }
                    } VrtpStyles.EndChildBox();
                    #endregion

                    #region Linear Velocity
                    VrtpStyles.BeginChildBox(); {
                        VrtpEditorUtils.ToggleProperty(_pLvUse, _pLvUse.content, VrtpStyles.sectionHeader);
                        if (_tb.useVelocity)
                        {
                            ++EditorGUI.indentLevel;
                            EditorGUILayout.PropertyField(_pLvStr, _gcLvStr);
                            EditorGUILayout.PropertyField(_pLvMin, _gcLvMin);
                            EditorGUILayout.PropertyField(_pLvMax, _gcLvMax);
                            EditorGUILayout.PropertyField(_pLvSmooth, _gcLvSmooth);
                            --EditorGUI.indentLevel;
                        }
                    } VrtpStyles.EndChildBox();
                    #endregion

                    #region Force Vignette
                    EditorGUILayout.Space();
                    VrtpEditorUtils.PropertyField(_pForceVigMode);
                    if (_pForceVigMode.p.intValue != (int)TunnellingBase.ForceVignetteMode.NONE)
                    {
                        VrtpEditorUtils.PropertyField(_pForceVigVal);
                    }
                    #endregion
                }
            } VrtpStyles.EndSectionBox();
            #endregion

            #region Effects
            VrtpStyles.BeginSectionBox(); {
                ++EditorGUI.indentLevel;
                _showMotionEffects.active = EditorGUILayout.Foldout(_showMotionEffects, "Motion Effects", VrtpStyles.sectionFoldout);
                --EditorGUI.indentLevel;
                if (_showMotionEffects)
                {
                    EditorGUILayout.Space();

                    #region Counter-motion
                    VrtpStyles.BeginChildBox(); {
                        VrtpEditorUtils.ToggleProperty(_pCounterMotion, null, VrtpStyles.sectionHeader);
                        if (_pCounterMotion.p.boolValue)
                        {
                            ++EditorGUI.indentLevel;
                            DrawCounterMotionSettings();
                            --EditorGUI.indentLevel;
                        }
                    } VrtpStyles.EndChildBox();
                    #endregion

                    EditorGUILayout.Separator();
                    EditorGUILayout.PropertyField(_pMotionEffectTarget);
                    if (_tb.motionEffectTarget == null && _tb.usingMotionEffectTarget)
                    {
                        EditorGUILayout.HelpBox("No motion effect target specified!", MessageType.Error);
                    }

                    #region Auto-tilt
                    VrtpStyles.BeginChildBox(); {
                        VrtpEditorUtils.ToggleProperty(_pArtTilt, null, VrtpStyles.sectionHeader);
                        if (_pArtTilt.p.boolValue)
                        {
                            ++EditorGUI.indentLevel;
                            EditorGUILayout.PropertyField(_pArtTiltStr);
                            EditorGUILayout.PropertyField(_pArtTiltMax);
                            EditorGUILayout.PropertyField(_pArtTiltSmooth);
                            --EditorGUI.indentLevel;
                        }
                    } VrtpStyles.EndChildBox();
                    #endregion

                    VrtpStyles.BeginChildBox(); {
                        EditorGUILayout.PropertyField(_pDivFps);
                        if (_pDivFps.p.intValue > 1)
                        {
                            EditorGUILayout.PropertyField(_pDivTrans);
                            EditorGUILayout.PropertyField(_pDivRot);
                        }
                    } VrtpStyles.EndChildBox();
                }
            } VrtpStyles.EndSectionBox();
            #endregion
        }