Skip to content

Commit 707b68d

Browse files
HDRenderLoop: Change struct TextureSettings to class + fix issue with single pass
1 parent dcfd9c9 commit 707b68d

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

Assets/ScriptableRenderLoop/HDRenderLoop/Editor/HDRenderLoopInspector.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,19 +273,28 @@ public override void OnInspectorGUI()
273273
EditorGUI.indentLevel++;
274274
EditorGUI.BeginChangeCheck();
275275

276-
tilePass.debugViewTilesFlags = EditorGUILayout.MaskField("DebugView Tiles", tilePass.debugViewTilesFlags, styles.tileLightLoopDebugTileFlagStrings);
277-
tilePass.enableSplitLightEvaluation = EditorGUILayout.Toggle(styles.splitLightEvaluation, tilePass.enableSplitLightEvaluation);
278276
tilePass.enableBigTilePrepass = EditorGUILayout.Toggle(styles.bigTilePrepass, tilePass.enableBigTilePrepass);
279277
tilePass.enableClustered = EditorGUILayout.Toggle(styles.clustered, tilePass.enableClustered);
280-
tilePass.disableTileAndCluster = EditorGUILayout.Toggle(styles.disableTileAndCluster, tilePass.disableTileAndCluster);
281278

282279
if (EditorGUI.EndChangeCheck())
283280
{
284281
EditorUtility.SetDirty(renderLoop); // Repaint
285282

286-
// If something is chanage on tilePassLightLoop we need to force a OnValidate() OnHDRenderLoop, else change Rebuild() will not be call
283+
// If something is chanage regarding tile/cluster rendering we need to force a OnValidate() OnHDRenderLoop, else change Rebuild() will not be call
287284
renderLoop.OnValidate();
288285
}
286+
287+
EditorGUI.BeginChangeCheck();
288+
289+
tilePass.debugViewTilesFlags = EditorGUILayout.MaskField("DebugView Tiles", tilePass.debugViewTilesFlags, styles.tileLightLoopDebugTileFlagStrings);
290+
tilePass.enableSplitLightEvaluation = EditorGUILayout.Toggle(styles.splitLightEvaluation, tilePass.enableSplitLightEvaluation);
291+
tilePass.disableTileAndCluster = EditorGUILayout.Toggle(styles.disableTileAndCluster, tilePass.disableTileAndCluster);
292+
293+
if (EditorGUI.EndChangeCheck())
294+
{
295+
EditorUtility.SetDirty(renderLoop); // Repaint
296+
UnityEditorInternal.InternalEditorUtility.RepaintAllViews();
297+
}
289298
EditorGUI.indentLevel--;
290299
}
291300
}

Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/TilePass/TilePass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public override void Rebuild(TextureSettings textureSettings)
285285
m_DebugViewTilesMaterial = Utilities.CreateEngineMaterial("Hidden/HDRenderLoop/DebugViewTiles");
286286

287287
m_SingleDeferredMaterial = Utilities.CreateEngineMaterial("Hidden/HDRenderLoop/Deferred");
288-
m_DeferredAllMaterial.EnableKeyword("LIGHTLOOP_SINGLE_PASS");
288+
m_SingleDeferredMaterial.EnableKeyword("LIGHTLOOP_SINGLE_PASS");
289289
}
290290

291291
public override void Cleanup()

Assets/ScriptableRenderLoop/common/TextureSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace UnityEngine.Experimental.ScriptableRenderLoop
22
{
33
[System.Serializable]
4-
public struct TextureSettings
4+
public class TextureSettings
55
{
66
public int spotCookieSize;
77
public int pointCookieSize;

0 commit comments

Comments
 (0)