Updated namespace;
Added UTSPass; Chnaged the RTHanlde _HairShadowMap to not reallocate when screen resolution decreased;
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using Unity.Rendering.Toon;
|
||||
namespace UnityEditor.Rendering.Toon
|
||||
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
[CustomEditor(typeof(DebugShadowmap))]
|
||||
|
||||
internal class DebugShadowmapInspector : Editor
|
||||
internal class DebugShadowmapInspector : UnityEditor.Editor
|
||||
{
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
@@ -19,14 +16,14 @@ namespace UnityEditor.Rendering.Toon
|
||||
|
||||
|
||||
|
||||
bool isChanged = false;
|
||||
var isChanged = false;
|
||||
|
||||
var obj = target as DebugShadowmap;
|
||||
|
||||
// hi cut filter
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
bool showShadow = EditorGUILayout.Toggle(labelDebugShadowmap, obj.m_enableShadowmapDebugging);
|
||||
var showShadow = EditorGUILayout.Toggle(labelDebugShadowmap, obj.m_enableShadowmapDebugging);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Changed Shadowmap debbuging flag");
|
||||
@@ -41,7 +38,7 @@ namespace UnityEditor.Rendering.Toon
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool binalization = EditorGUILayout.Toggle(labelBinalization, obj.m_enableBinalization);
|
||||
var binalization = EditorGUILayout.Toggle(labelBinalization, obj.m_enableBinalization);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
@@ -59,7 +56,7 @@ namespace UnityEditor.Rendering.Toon
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool showSlefShadow = EditorGUILayout.Toggle(labelDebugSelfShadow, obj.m_enableSelfShadowDebugging);
|
||||
var showSlefShadow = EditorGUILayout.Toggle(labelDebugSelfShadow, obj.m_enableSelfShadowDebugging);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
@@ -72,7 +69,7 @@ namespace UnityEditor.Rendering.Toon
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool showOutline = EditorGUILayout.Toggle(labelNoOutline, obj.m_enableOutlineDebugging);
|
||||
var showOutline = EditorGUILayout.Toggle(labelNoOutline, obj.m_enableOutlineDebugging);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace Unity.Toonshader.Editor
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
public class ConverterInitializer
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.Toonshader.Editor
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
public struct QuaternionToVector3Converter
|
||||
{
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using Unity.Rendering.Toon;
|
||||
namespace UnityEditor.Rendering.Toon
|
||||
using UnityEngine;
|
||||
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ModelToonEvAdjustment))]
|
||||
|
||||
internal class ModelToonEvAdjustmentInspector : Editor
|
||||
internal class ModelToonEvAdjustmentInspector : UnityEditor.Editor
|
||||
{
|
||||
SerializedObject m_SerializedObject;
|
||||
|
||||
@@ -20,14 +18,14 @@ namespace UnityEditor.Rendering.Toon
|
||||
const string labeIgnoreVolumeExposure = "Ignore Volume Exposure";
|
||||
const string labelCompensation = "Compensation";
|
||||
|
||||
bool isChanged = false;
|
||||
var isChanged = false;
|
||||
|
||||
var obj = target as ModelToonEvAdjustment;
|
||||
|
||||
// hi cut filter
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
bool egnoreExposure = EditorGUILayout.Toggle(labeIgnoreVolumeExposure, obj.m_IgnorVolumeExposure);
|
||||
var egnoreExposure = EditorGUILayout.Toggle(labeIgnoreVolumeExposure, obj.m_IgnorVolumeExposure);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Changed Ignore Volume Exposure");
|
||||
@@ -38,7 +36,7 @@ namespace UnityEditor.Rendering.Toon
|
||||
// hi cut filter
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
bool lightFilterr = EditorGUILayout.Toggle(labelLightHighCutFilter, obj.m_ToonLightHiCutFilter);
|
||||
var lightFilterr = EditorGUILayout.Toggle(labelLightHighCutFilter, obj.m_ToonLightHiCutFilter);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Changed Light Hi Cut Filter");
|
||||
@@ -50,7 +48,7 @@ namespace UnityEditor.Rendering.Toon
|
||||
// Compensation
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
float compensation = EditorGUILayout.FloatField(labelCompensation, obj.m_Compensation);
|
||||
var compensation = EditorGUILayout.FloatField(labelCompensation, obj.m_Compensation);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Changed Compensation");
|
||||
@@ -62,7 +60,7 @@ namespace UnityEditor.Rendering.Toon
|
||||
|
||||
// curve
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool exposureAdjustment = EditorGUILayout.Toggle(labelLightAdjustment, obj.m_ExposureAdjustmnt);
|
||||
var exposureAdjustment = EditorGUILayout.Toggle(labelLightAdjustment, obj.m_ExposureAdjustmnt);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Changed Expsure Adjustment");
|
||||
@@ -82,7 +80,7 @@ namespace UnityEditor.Rendering.Toon
|
||||
EditorGUI.BeginChangeCheck();
|
||||
// var ranges = new Rect(-10, -10, 20, 20);
|
||||
// var curve = EditorGUILayout.CurveField(labelExposureCurave, obj.m_AnimationCurve, Color.green,ranges);
|
||||
AnimationCurve curve = EditorGUILayout.CurveField(labelLightAdjustmentCurve, obj.m_AnimationCurve);
|
||||
var curve = EditorGUILayout.CurveField(labelLightAdjustmentCurve, obj.m_AnimationCurve);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
@@ -91,7 +89,7 @@ namespace UnityEditor.Rendering.Toon
|
||||
isChanged = true;
|
||||
}
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool buttonIsPressed = GUILayout.Button("Reset", GUILayout.Width(50));
|
||||
var buttonIsPressed = GUILayout.Button("Reset", GUILayout.Width(50));
|
||||
var curve2 = obj.m_AnimationCurve;
|
||||
if (buttonIsPressed)
|
||||
{
|
||||
@@ -134,7 +132,7 @@ namespace UnityEditor.Rendering.Toon
|
||||
float ConvertFromEV100(float EV100)
|
||||
{
|
||||
|
||||
float val = Mathf.Pow(2, EV100) * 2.5f;
|
||||
var val = Mathf.Pow(2, EV100) * 2.5f;
|
||||
return val;
|
||||
|
||||
}
|
||||
@@ -155,7 +153,7 @@ namespace UnityEditor.Rendering.Toon
|
||||
|
||||
var go = Selection.activeGameObject;
|
||||
if (go == null)
|
||||
go.AddComponent<ModelToonEvAdjustment>();
|
||||
go.AddComponent<ModelToonEvAdjustment>();
|
||||
else
|
||||
{
|
||||
Debug.LogError("Please, select a GameObject you want to attach.");
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using Unity.Rendering.HighDefinition.Toon;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace Unity.Toonshader.Editor
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
[CustomEditor(typeof(BoxLightAdjustment))]
|
||||
public class BoxLightAdjustmentView : UnityEditor.Editor
|
||||
|
||||
Reference in New Issue
Block a user