@@ -20,7 +20,6 @@ private class Styles
20
20
21
21
public readonly GUIContent useForwardRenderingOnly = new GUIContent ( "Use Forward Rendering Only" ) ;
22
22
public readonly GUIContent useDepthPrepass = new GUIContent ( "Use Depth Prepass" ) ;
23
- public readonly GUIContent useSinglePassLightLoop = new GUIContent ( "Use single Pass light loop" ) ;
24
23
25
24
public bool isDebugViewMaterialInit = false ;
26
25
public GUIContent [ ] debugViewMaterialStrings = null ;
@@ -45,10 +44,12 @@ private class Styles
45
44
public readonly GUIContent shadowsCascades = new GUIContent ( "Cascade values" ) ;
46
45
47
46
public readonly GUIContent tileLightLoopSettings = new GUIContent ( "Tile Light Loop settings" ) ;
48
- public readonly string [ ] tileLightLoopDebugTileFlagStrings = new string [ ] { "Direct Light" , "Reflection Light" , "Area Light" } ;
49
- public readonly GUIContent directIndirectSinglePass = new GUIContent ( "Enable direct and indirect lighting in single pass " , "Toggle" ) ;
47
+ public readonly string [ ] tileLightLoopDebugTileFlagStrings = new string [ ] { "Punctual Light" , "Area Light" , "Env Light" } ;
48
+ public readonly GUIContent splitLightEvaluation = new GUIContent ( "Split light and reflection evaluation " , "Toggle" ) ;
50
49
public readonly GUIContent bigTilePrepass = new GUIContent ( "Enable big tile prepass" , "Toggle" ) ;
51
50
public readonly GUIContent clustered = new GUIContent ( "Enable clustered" , "Toggle" ) ;
51
+ public readonly GUIContent disableTileAndCluster = new GUIContent ( "Disable Tile/clustered" , "Toggle" ) ;
52
+
52
53
53
54
54
55
public readonly GUIContent textureSettings = new GUIContent ( "texture Settings" ) ;
@@ -192,7 +193,6 @@ public override void OnInspectorGUI()
192
193
debugParameters . displayTransparentObjects = EditorGUILayout . Toggle ( styles . displayTransparentObjects , debugParameters . displayTransparentObjects ) ;
193
194
debugParameters . useForwardRenderingOnly = EditorGUILayout . Toggle ( styles . useForwardRenderingOnly , debugParameters . useForwardRenderingOnly ) ;
194
195
debugParameters . useDepthPrepass = EditorGUILayout . Toggle ( styles . useDepthPrepass , debugParameters . useDepthPrepass ) ;
195
- debugParameters . useSinglePassLightLoop = EditorGUILayout . Toggle ( styles . useSinglePassLightLoop , debugParameters . useSinglePassLightLoop ) ;
196
196
197
197
if ( EditorGUI . EndChangeCheck ( ) )
198
198
{
@@ -265,24 +265,36 @@ public override void OnInspectorGUI()
265
265
266
266
EditorGUILayout . Space ( ) ;
267
267
268
- if ( renderLoop . tilePassLightLoop != null )
268
+ // TODO: we should call a virtual method or something similar to setup the UI, inspector should not know about it
269
+ TilePass . LightLoop tilePass = renderLoop . lightLoop as TilePass . LightLoop ;
270
+ if ( tilePass != null )
269
271
{
270
272
EditorGUILayout . LabelField ( styles . tileLightLoopSettings ) ;
271
273
EditorGUI . indentLevel ++ ;
272
274
EditorGUI . BeginChangeCheck ( ) ;
273
275
274
- renderLoop . tilePassLightLoop . debugViewTilesFlags = EditorGUILayout . MaskField ( "DebugView Tiles" , renderLoop . tilePassLightLoop . debugViewTilesFlags , styles . tileLightLoopDebugTileFlagStrings ) ;
275
- renderLoop . tilePassLightLoop . enableDirectIndirectSinglePass = EditorGUILayout . Toggle ( styles . directIndirectSinglePass , renderLoop . tilePassLightLoop . enableDirectIndirectSinglePass ) ;
276
- renderLoop . tilePassLightLoop . enableBigTilePrepass = EditorGUILayout . Toggle ( styles . bigTilePrepass , renderLoop . tilePassLightLoop . enableBigTilePrepass ) ;
277
- renderLoop . tilePassLightLoop . enableClustered = EditorGUILayout . Toggle ( styles . clustered , renderLoop . tilePassLightLoop . enableClustered ) ;
276
+ tilePass . enableBigTilePrepass = EditorGUILayout . Toggle ( styles . bigTilePrepass , tilePass . enableBigTilePrepass ) ;
277
+ tilePass . enableClustered = EditorGUILayout . Toggle ( styles . clustered , tilePass . enableClustered ) ;
278
278
279
279
if ( EditorGUI . EndChangeCheck ( ) )
280
280
{
281
281
EditorUtility . SetDirty ( renderLoop ) ; // Repaint
282
282
283
- // 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
284
284
renderLoop . OnValidate ( ) ;
285
285
}
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
+ }
286
298
EditorGUI . indentLevel -- ;
287
299
}
288
300
}
0 commit comments