public override void OnInspectorGUI() { SCPE_GUI.DisplayDocumentationButton("lens-flares"); SCPE_GUI.DisplayVRWarning(); PropertyField(intensity); PropertyField(luminanceThreshold); //Flares PropertyField(iterations); if (iterations.value.intValue > 1) { PropertyField(distance); } PropertyField(falloff); //Halo PropertyField(haloSize); PropertyField(haloWidth); PropertyField(maskTex); PropertyField(chromaticAbberation); PropertyField(colorTex); if (colorTex.value.objectReferenceValue) { SCPE.CheckGradientImportSettings(colorTex); } //Blur PropertyField(blur); PropertyField(passes); }
public override void OnInspectorGUI() { SCPE_GUI.DisplayDocumentationButton("gradient"); PropertyField(intensity); PropertyField(input); //If Radial if (input.value.intValue == 1) { PropertyField(gradientTex); if (gradientTex.value.objectReferenceValue) { SCPE.CheckGradientImportSettings(gradientTex); } } else { PropertyField(color1); PropertyField(color2); } PropertyField(mode); PropertyField(rotation); }
public override void OnInspectorGUI() { SCPE_GUI.DisplayDocumentationButton("colorize"); PropertyField(mode); PropertyField(intensity); PropertyField(colorRamp); if (colorRamp.value.objectReferenceValue) { SCPE.CheckGradientImportSettings(colorRamp); } }
public override void OnInspectorGUI() { SCPE_GUI.DisplayDocumentationButton("fog"); SCPE_GUI.DisplayVRWarning(); SCPE_GUI.DisplaySetupWarning <FogRenderer>(); if (RenderSettings.fog) { EditorGUILayout.BeginVertical(); { EditorGUILayout.HelpBox("Fog is currently enabled in the active scene, resulting in an overlapping fog effect", MessageType.Warning); using (new EditorGUILayout.HorizontalScope()) { if (GUILayout.Button("Disable scene fog")) { RenderSettings.fog = false; EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); } GUILayout.FlexibleSpace(); } } EditorGUILayout.EndVertical(); EditorGUILayout.Space(); } PropertyField(useSceneSettings); EditorGUILayout.Space(); m_showControls.target = !useSceneSettings.value.boolValue; if (EditorGUILayout.BeginFadeGroup(m_showControls.faded)) { PropertyField(fogMode); PropertyField(fogStartDistance); if (fogMode.value.intValue == 1) { PropertyField(fogEndDistance); } else { PropertyField(fogDensity); } PropertyField(colorMode); if (colorMode.value.intValue == 0) { PropertyField(fogColor); } else if (colorMode.value.intValue == 1) //gradient { PropertyField(fogColorGradient); if (fogColorGradient.value.objectReferenceValue) { SCPE.CheckGradientImportSettings(fogColorGradient); GUILayout.Space(5f); //Gradient preview using (new EditorGUILayout.HorizontalScope()) { EditorGUILayout.LabelField("Near", GUILayout.MaxWidth(32f)); Rect rect = GUILayoutUtility.GetRect(1, 12, "TextField"); EditorGUI.DrawTextureTransparent(rect, fogColorGradient.value.objectReferenceValue as Texture2D); EditorGUILayout.LabelField("Far", GUILayout.MaxWidth(30f)); } EditorGUILayout.BeginHorizontal(); { EditorGUI.BeginDisabledGroup(!gradientUseFarClipPlane.value.boolValue); { PropertyField(gradientDistance, new GUIContent("Distance")); } EditorGUI.EndDisabledGroup(); gradientUseFarClipPlane.overrideState.boolValue = true; gradientUseFarClipPlane.value.boolValue = !GUILayout.Toggle(!gradientUseFarClipPlane.value.boolValue, new GUIContent("Automatic", "Distance will be set by the camera's far clipping plane"), EditorStyles.miniButton); } EditorGUILayout.EndHorizontal(); //EditorGUILayout.HelpBox("In scene view, the gradient will appear to look different due to the camera's dynamic far clipping value", MessageType.None); } } else if (colorMode.value.intValue == 2) //Skybox { #if !LWRP_5_7_2_OR_NEWER if (UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset) { if (UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset.name.Contains("LWRP")) { EditorGUILayout.HelpBox("This feature requires atleast LWRP version 5.7.2. If you're using this version, rerun the installer through the Help window", MessageType.Error); } } #endif if (UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset) { if (UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset.name.Contains("HDR")) { EditorGUILayout.HelpBox("This feature is not supported in the HDRP", MessageType.Error); } } #if PPS_DEV //Hide parameter, implementation isn't ideal and will cause pixel marching, won't look good in any case PropertyField(skyboxMipLevel); #endif } } EditorGUILayout.EndFadeGroup(); PropertyField(distanceFog); if (colorMode.value.intValue == 1 && distanceFog.value.boolValue == false && heightFog.value.boolValue) { EditorGUILayout.HelpBox("Distance fog must be enabled when using the Gradient Texture color mode. Height fog only will not be colored correctly", MessageType.Warning); } if (distanceFog.value.boolValue) { PropertyField(useRadialDistance, new GUIContent("Radial")); PropertyField(distanceDensity); } //Always exclude skybox for skybox color mode PropertyField(skyboxInfluence, new GUIContent("Influence")); PropertyField(enableDirectionalLight); m_showSun.target = enableDirectionalLight.value.boolValue; if (EditorGUILayout.BeginFadeGroup(m_showSun.faded)) { if (FogLightSource.sunDirection == Vector3.zero && (useLightDirection.value.boolValue || useLightColor.value.boolValue || useLightIntensity.value.boolValue)) { EditorGUILayout.HelpBox("No source Directional Light found!\n\nAdd the \"FogLightSource\" script to your main light", MessageType.Warning); GUILayout.Space(-32); using (new EditorGUILayout.HorizontalScope()) { GUILayout.FlexibleSpace(); if (GUILayout.Button("Add", GUILayout.Width(60))) { FogLightSourceInspector.AddLightSource(); } GUILayout.Space(8); } GUILayout.Space(11); } PropertyField(useLightDirection); if (!useLightDirection.value.boolValue) { PropertyField(lightDirection); } PropertyField(useLightColor); if (!useLightColor.value.boolValue) { PropertyField(lightColor); } PropertyField(useLightIntensity); if (!useLightIntensity.value.boolValue) { PropertyField(lightIntensity); } } EditorGUILayout.EndFadeGroup(); PropertyField(heightFog); m_showHeight.target = heightFog.value.boolValue; if (EditorGUILayout.BeginFadeGroup(m_showHeight.faded)) { if (RuntimeUtilities.isSinglePassStereoSelected) { EditorGUILayout.HelpBox("Not supported in VR", MessageType.Warning); } PropertyField(height); PropertyField(heightDensity); PropertyField(heightFogNoise); if (heightFogNoise.value.boolValue) { #if UNITY_2018_1_OR_NEWER //EditorGUILayout.HelpBox("Fog noise is currently bugged when using the Post Processing installed through the Package Manager.", MessageType.Warning); #endif PropertyField(heightNoiseTex); if (heightNoiseTex.value.objectReferenceValue) { PropertyField(heightNoiseSize); PropertyField(heightNoiseStrength); PropertyField(heightNoiseSpeed); } } } EditorGUILayout.EndFadeGroup(); PropertyField(lightScattering); m_showScattering.target = lightScattering.value.boolValue; if (EditorGUILayout.BeginFadeGroup(m_showScattering.faded)) { PropertyField(scatterIntensity); PropertyField(scatterThreshold); PropertyField(scatterDiffusion); PropertyField(scatterSoftKnee); } EditorGUILayout.EndFadeGroup(); }