浏览代码
Merge branch 'master' of https://github.com/Unity-Technologies/ScriptableRenderLoop into Branch_Batching2
Merge branch 'master' of https://github.com/Unity-Technologies/ScriptableRenderLoop into Branch_Batching2
# Conflicts: # Assets/ScriptableRenderPipeline/PostProcessing/Branch_Batching2
Arnaud Carre
8 年前
当前提交
df0c1521
共有 168 个文件被更改,包括 6593 次插入 和 2914 次删除
-
113Assets/GraphicsTests/Framework/Editor/TestFrameworkCustomBuild.cs
-
1Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Assets/LDPipe_CommonAssets/Materials/Cornell Box.mat
-
1Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Assets/LDPipe_CommonAssets/Materials/Cornell Box_green.mat
-
1Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Assets/LDPipe_CommonAssets/Materials/Cornell Box_red.mat
-
5Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Assets/LDPipe_Shader/LDPipe_LitMat_05_Emission.mat
-
1Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Assets/LDPipe_Shader/LDPipe_LitMat_Reflection_Non.mat
-
29Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes.unity
-
154Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes/LightingData.asset
-
4Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes/LightingData.asset.meta
-
1001Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes/Lightmap-0_comp_light.exr
-
5Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes/Lightmap-0_comp_light.exr.meta
-
2Assets/ScriptableRenderPipeline/Core/Camera/CameraSwitcher.cs
-
24Assets/ScriptableRenderPipeline/Core/Debugging/DebugActionManager.cs
-
177Assets/ScriptableRenderPipeline/Core/Debugging/DebugMenuManager.cs
-
163Assets/ScriptableRenderPipeline/Core/Debugging/DebugMenuUI.cs
-
22Assets/ScriptableRenderPipeline/Core/Debugging/DebugMenuUpdater.cs
-
26Assets/ScriptableRenderPipeline/Core/Debugging/Editor/DebugMenuEditor.cs
-
26Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplay.cs
-
329Assets/ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineInspector.cs
-
10Assets/ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs
-
313Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
-
199Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePassProducer.asset
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLit.shader
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/LayeredLitTessellation.shader
-
42Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/LitUI.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.shader
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitTessellation.shader
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/SubsurfaceScatteringProfile.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/MaterialUtilities.hlsl
-
6Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/Editor/BaseUnlitUI.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/SceneSettings.cs
-
13Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/RuntimeFilterIBL.cs
-
8Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/SkyManager.cs
-
21Assets/ScriptableRenderPipeline/HDRenderPipeline/Utilities.cs
-
17Assets/ScriptableRenderPipeline/LowEndMobilePipeline/Editor/LowendMobilePipelineMaterialEditor.cs
-
2Assets/ScriptableRenderPipeline/LowEndMobilePipeline/Editor/LowendUpgraders.cs
-
1Assets/ScriptableRenderPipeline/LowEndMobilePipeline/LowEndMobilePipeline.cs
-
60Assets/ScriptableRenderPipeline/LowEndMobilePipeline/Shaders/LowEndMobilePipeline.shader
-
10Assets/ScriptableRenderPipeline/LowEndMobilePipeline/Shaders/LowEndMobilePipelineCore.cginc
-
44Assets/ScriptableRenderPipeline/LowEndMobilePipeline/Shaders/LowEndMobilePipelineShadows.cginc
-
2Assets/ScriptableRenderPipeline/ShaderLibrary/ImageBasedLighting.hlsl
-
999ImageTemplates/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes.unity.png
-
2ProjectSettings/ProjectVersion.txt
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplayLatlong.shader
-
6Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplayShadowMap.shader
-
12Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugViewMaterialGBuffer.shader
-
8Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugViewTiles.shader
-
22Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/lightlistbuild-bigtile.compute
-
48Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/scrbound.compute
-
1001Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/lightlistbuild.compute
-
32Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/lightlistbuild-clustered.compute
-
248Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/shadeopaque.compute
-
10Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/Deferred.shader
-
6Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/DrawGaussianProfile.shader
-
6Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/DrawTransmittanceGraph.shader
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/BuildProbabilityTables.compute
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/ComputeGgxIblSampleData.compute
-
6Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/GGXConvolve.shader
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/BlitCubemap.shader
-
9Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitBakedEmission.meta
-
522Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitBakedEmission.unity
-
8Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitBakedEmission.unity.meta
-
336Assets/ScriptableRenderPipeline/Core/Debugging/DebugItemHandler.cs
-
460Assets/ScriptableRenderPipeline/Core/Debugging/DebugItemUI.cs
-
143Assets/ScriptableRenderPipeline/Core/Debugging/DebugMenuState.cs
-
12Assets/ScriptableRenderPipeline/Core/Debugging/DebugMenuState.cs.meta
-
146Assets/ScriptableRenderPipeline/Core/Debugging/DebugPanel.cs
-
176Assets/ScriptableRenderPipeline/Core/Debugging/DebugPanelUI.cs
-
12Assets/ScriptableRenderPipeline/Core/Debugging/DebugPanelUI.cs.meta
-
9Assets/ScriptableRenderPipeline/Core/Debugging/Serialization.meta
-
70Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/LightingDebugPanel.cs
-
12Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/LightingDebugPanel.cs.meta
-
56Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset
-
9Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset.meta
-
222Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs
-
12Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs.meta
-
9Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources.meta
-
744ImageTemplates/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitBakedEmission.unity.png
-
7Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitBakedEmission/LightingData.asset
-
9Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitBakedEmission/LightingData.asset.meta
-
1001Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitBakedEmission/Lightmap-0_comp_light.exr
-
75Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitBakedEmission/Lightmap-0_comp_light.exr.meta
-
12Assets/ScriptableRenderPipeline/Core/Debugging/Serialization/DebugItemStateBool.cs.meta
-
12Assets/ScriptableRenderPipeline/Core/Debugging/Serialization/DebugItemStateColor.cs.meta
-
12Assets/ScriptableRenderPipeline/Core/Debugging/Serialization/DebugItemStateFloat.cs.meta
-
12Assets/ScriptableRenderPipeline/Core/Debugging/Serialization/DebugItemStateInt.cs.meta
-
12Assets/ScriptableRenderPipeline/Core/Debugging/Serialization/DebugItemStateUInt.cs.meta
-
10Assets/ScriptableRenderPipeline/Core/Debugging/Serialization/DebugItemStateBool.cs
-
10Assets/ScriptableRenderPipeline/Core/Debugging/Serialization/DebugItemStateColor.cs
-
10Assets/ScriptableRenderPipeline/Core/Debugging/Serialization/DebugItemStateFloat.cs
-
10Assets/ScriptableRenderPipeline/Core/Debugging/Serialization/DebugItemStateInt.cs
-
10Assets/ScriptableRenderPipeline/Core/Debugging/Serialization/DebugItemStateUInt.cs
-
20Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/DefaultCommonSettings.asset
-
44Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/HDRenderPipelineResources.asset
|
|||
using System.IO; |
|||
using UnityEditor; |
|||
public class TestFrameworkCustomBuild |
|||
{ |
|||
private static readonly string s_TestSceneFolder = "/GraphicsTests/Scenes"; |
|||
private static readonly string s_BuildFolder = "/TestScenesBuild"; |
|||
public class TestFrameworkCustomBuild |
|||
{ |
|||
private static readonly string s_TestSceneFolder = "/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes"; |
|||
private static readonly string s_BuildFolder = "/TestScenesBuild"; |
|||
|
|||
[MenuItem("RenderPipeline/TestFramework/Build-iOS")] |
|||
public static void BuildiOS() |
|||
{ |
|||
TestFrameworkCustomBuild builder = new TestFrameworkCustomBuild(); |
|||
builder.Build(BuildTarget.iOS, BuildOptions.AcceptExternalModificationsToPlayer); |
|||
} |
|||
|
|||
[MenuItem("RenderPipeline/TestFramework/Build-iOS", true)] |
|||
|
|||
public static bool ValidateBuildiOS() |
|||
{ |
|||
#if UNITY_STANDALONE_OSX
|
|||
return true; |
|||
#else
|
|||
return false; |
|||
#endif
|
|||
} |
|||
|
|||
public void Build(BuildTarget target, BuildOptions options) |
|||
{ |
|||
var absoluteScenesPath = Application.dataPath + s_TestSceneFolder; |
|||
string[] levels = System.IO.Directory.GetFiles(absoluteScenesPath, "*.unity", System.IO.SearchOption.AllDirectories); |
|||
CheckAndAddGotoNextSceneBehavior(levels); |
|||
[MenuItem("RenderPipeline/TestFramework/Build-iOS")] |
|||
public static void BuildiOS() |
|||
{ |
|||
TestFrameworkCustomBuild builder = new TestFrameworkCustomBuild(); |
|||
builder.Build(BuildTarget.iOS, BuildOptions.AcceptExternalModificationsToPlayer); |
|||
} |
|||
string savePath = EditorUtility.SaveFolderPanel("Select folder to save project", "", ""); |
|||
BuildPipeline.BuildPlayer(levels, savePath + s_BuildFolder, target, options); |
|||
} |
|||
public void Build(BuildTarget target, BuildOptions options) |
|||
{ |
|||
var absoluteScenesPath = Application.dataPath + s_TestSceneFolder; |
|||
string[] levels = System.IO.Directory.GetFiles(absoluteScenesPath, "*.unity", System.IO.SearchOption.AllDirectories); |
|||
CheckAndAddGotoNextSceneBehavior(levels); |
|||
private void CheckAndAddGotoNextSceneBehavior(string[] levels) |
|||
{ |
|||
for (int i = 0; i < levels.Length; ++i) |
|||
{ |
|||
string levelPath = levels[i]; |
|||
var scene = EditorSceneManager.OpenScene(levelPath); |
|||
GameObject[] objects = scene.GetRootGameObjects(); |
|||
bool componentFound = false; |
|||
string savePath = EditorUtility.SaveFolderPanel("Select folder to save project", "", ""); |
|||
BuildPipeline.BuildPlayer(levels, savePath + s_BuildFolder, target, options); |
|||
} |
|||
foreach (GameObject go in objects) |
|||
{ |
|||
GotoNextScene component = go.GetComponent<GotoNextScene>(); |
|||
if (component != null) |
|||
{ |
|||
component.m_NextSceneIndex = (i + 1) % levels.Length; |
|||
componentFound = true; |
|||
break; |
|||
} |
|||
} |
|||
private void CheckAndAddGotoNextSceneBehavior(string[] levels) |
|||
{ |
|||
for (int i = 0; i < levels.Length; ++i) |
|||
{ |
|||
string levelPath = levels[i]; |
|||
var scene = EditorSceneManager.OpenScene(levelPath); |
|||
GameObject[] objects = scene.GetRootGameObjects(); |
|||
bool componentFound = false; |
|||
if (!componentFound) |
|||
{ |
|||
GameObject gotoNextScene = new GameObject("GotoNextScene"); |
|||
GotoNextScene component = gotoNextScene.AddComponent<GotoNextScene>(); |
|||
component.m_NextSceneIndex = (i + 1) % levels.Length; |
|||
} |
|||
foreach (GameObject go in objects) |
|||
{ |
|||
GotoNextScene component = go.GetComponent<GotoNextScene>(); |
|||
if (component != null) |
|||
{ |
|||
component.m_NextSceneIndex = (i + 1) % levels.Length; |
|||
componentFound = true; |
|||
break; |
|||
} |
|||
} |
|||
|
|||
if (!componentFound) |
|||
{ |
|||
GameObject gotoNextScene = new GameObject("GotoNextScene"); |
|||
GotoNextScene component = gotoNextScene.AddComponent<GotoNextScene>(); |
|||
component.m_NextSceneIndex = (i + 1) % levels.Length; |
|||
} |
|||
|
|||
EditorSceneManager.SaveScene(scene); |
|||
EditorSceneManager.UnloadSceneAsync(scene); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
EditorSceneManager.SaveScene(scene); |
|||
EditorSceneManager.UnloadSceneAsync(scene); |
|||
} |
|||
} |
|||
} |
|||
} |
154
Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes/LightingData.asset
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1001
Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes/Lightmap-0_comp_light.exr
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
999
ImageTemplates/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes.unity.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
m_EditorVersion: 2017.2.0a1 |
|||
m_EditorVersion: 2017.2.0a2 |
1001
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/lightlistbuild.compute
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
#pragma kernel ShadeOpaque_Direct_Fptl SHADE_OPAQUE_ENTRY=ShadeOpaque_Direct_Fptl USE_FPTL_LIGHTLIST |
|||
#pragma kernel ShadeOpaque_Direct_Fptl_DebugDisplay SHADE_OPAQUE_ENTRY=ShadeOpaque_Direct_Fptl_DebugDisplay USE_FPTL_LIGHTLIST DEBUG_DISPLAY |
|||
#pragma kernel ShadeOpaque_Direct_Clustered SHADE_OPAQUE_ENTRY=ShadeOpaque_Direct_Clustered USE_CLUSTERED_LIGHTLIST |
|||
#pragma kernel ShadeOpaque_Direct_Clustered_DebugDisplay SHADE_OPAQUE_ENTRY=ShadeOpaque_Direct_Clustered_DebugDisplay USE_CLUSTERED_LIGHTLIST DEBUG_DISPLAY |
|||
|
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant0 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant0 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=0 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant1 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant1 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=1 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant2 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant2 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=2 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant3 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant3 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=3 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant4 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant4 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=4 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant5 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant5 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=5 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant6 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant6 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=6 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant7 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant7 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=7 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant8 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant8 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=8 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant9 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant9 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=9 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant10 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant10 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=10 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant11 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant11 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=11 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant12 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant12 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=12 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant13 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant13 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=13 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant14 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant14 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=14 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant15 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant15 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=15 |
|||
|
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant0 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant0 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=0 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant1 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant1 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=1 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant2 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant2 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=2 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant3 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant3 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=3 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant4 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant4 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=4 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant5 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant5 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=5 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant6 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant6 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=6 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant7 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant7 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=7 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant8 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant8 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=8 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant9 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant9 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=9 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant10 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant10 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=10 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant11 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant11 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=11 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant12 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant12 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=12 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant13 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant13 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=13 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant14 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant14 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=14 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant15 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant15 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=15 |
|||
|
|||
#pragma #pragma enable_d3d11_debug_symbols |
|||
|
|||
// Split lighting is required for the SSS pass. |
|||
// Not currently possible since we need to access the stencil buffer from the compute shader. |
|||
// #pragma multi_compile _ OUTPUT_SPLIT_LIGHTING |
|||
|
|||
#define LIGHTLOOP_TILE_PASS 1 |
|||
#define LIGHTLOOP_TILE_DIRECT 1 |
|||
#define LIGHTLOOP_TILE_INDIRECT 1 |
|||
#define LIGHTLOOP_TILE_ALL 1 |
|||
|
|||
//------------------------------------------------------------------------------------- |
|||
// Include |
|||
//------------------------------------------------------------------------------------- |
|||
|
|||
#include "../../../../ShaderLibrary/Common.hlsl" |
|||
#include "../../../Debug/DebugDisplay.hlsl" |
|||
|
|||
// Note: We have fix as guidelines that we have only one deferred material (with control of GBuffer enabled). Mean a users that add a new |
|||
// deferred material must replace the old one here. If in the future we want to support multiple layout (cause a lot of consistency problem), |
|||
// the deferred shader will require to use multicompile. |
|||
#define UNITY_MATERIAL_LIT // Need to be define before including Material.hlsl |
|||
#include "../../../ShaderConfig.cs.hlsl" |
|||
#include "../../../ShaderVariables.hlsl" |
|||
#include "../../../Lighting/Lighting.hlsl" // This include Material.hlsl |
|||
#include "../../../Lighting/TilePass/FeatureFlags.hlsl" |
|||
//------------------------------------------------------------------------------------- |
|||
// variable declaration |
|||
//------------------------------------------------------------------------------------- |
|||
|
|||
DECLARE_GBUFFER_TEXTURE(_GBufferTexture); |
|||
|
|||
#ifdef OUTPUT_SPLIT_LIGHTING |
|||
RWTexture2D<float4> specularLightingUAV; |
|||
RWTexture2D<float3> diffuseLightingUAV; |
|||
#else |
|||
RWTexture2D<float4> combinedLightingUAV; |
|||
#endif |
|||
|
|||
#if USE_INDIRECT |
|||
uint g_TileListOffset; |
|||
StructuredBuffer<uint> g_TileList; |
|||
// Indirect |
|||
[numthreads(16, 16, 1)] |
|||
void SHADE_OPAQUE_ENTRY(uint2 groupThreadId : SV_GroupThreadID, uint groupId : SV_GroupID) |
|||
{ |
|||
uint tileIndex = g_TileList[g_TileListOffset + groupId]; |
|||
uint2 tileCoord = uint2(tileIndex & 0xFFFF, tileIndex >> 16); |
|||
uint2 pixelCoord = tileCoord * GetTileSize() + groupThreadId; |
|||
|
|||
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, tileCoord); |
|||
uint featureFlags = TileVariantToFeatureFlags(VARIANT); |
|||
#else |
|||
// Direct |
|||
[numthreads(16, 16, 1)] |
|||
void SHADE_OPAQUE_ENTRY(uint2 dispatchThreadId : SV_DispatchThreadID, uint2 groupId : SV_GroupID) |
|||
{ |
|||
uint2 pixelCoord = dispatchThreadId; |
|||
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, groupId); |
|||
uint featureFlags = 0xFFFFFFFF; |
|||
#endif |
|||
|
|||
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.unPositionSS).x; |
|||
UpdatePositionInput(depth, _InvViewProjMatrix, _ViewProjMatrix, posInput); |
|||
float3 V = GetWorldSpaceNormalizeViewDir(posInput.positionWS); |
|||
|
|||
FETCH_GBUFFER(gbuffer, _GBufferTexture, posInput.unPositionSS); |
|||
BSDFData bsdfData; |
|||
float3 bakeDiffuseLighting; |
|||
DECODE_FROM_GBUFFER(gbuffer, featureFlags, bsdfData, bakeDiffuseLighting); |
|||
|
|||
PreLightData preLightData = GetPreLightData(V, posInput, bsdfData); |
|||
|
|||
float3 diffuseLighting; |
|||
float3 specularLighting; |
|||
LightLoop(V, posInput, preLightData, bsdfData, bakeDiffuseLighting, featureFlags, diffuseLighting, specularLighting); |
|||
|
|||
#ifdef OUTPUT_SPLIT_LIGHTING |
|||
specularLightingUAV[pixelCoord] = float4(specularLighting, 1.0); |
|||
diffuseLightingUAV[pixelCoord] = diffuseLighting; |
|||
#else |
|||
combinedLightingUAV[pixelCoord] = float4(diffuseLighting + specularLighting, 1.0); |
|||
#endif |
|||
} |
|||
|
|||
#pragma kernel ShadeOpaque_Direct_Fptl SHADE_OPAQUE_ENTRY=ShadeOpaque_Direct_Fptl USE_FPTL_LIGHTLIST |
|||
#pragma kernel ShadeOpaque_Direct_Fptl_DebugDisplay SHADE_OPAQUE_ENTRY=ShadeOpaque_Direct_Fptl_DebugDisplay USE_FPTL_LIGHTLIST DEBUG_DISPLAY |
|||
#pragma kernel ShadeOpaque_Direct_Clustered SHADE_OPAQUE_ENTRY=ShadeOpaque_Direct_Clustered USE_CLUSTERED_LIGHTLIST |
|||
#pragma kernel ShadeOpaque_Direct_Clustered_DebugDisplay SHADE_OPAQUE_ENTRY=ShadeOpaque_Direct_Clustered_DebugDisplay USE_CLUSTERED_LIGHTLIST DEBUG_DISPLAY |
|||
|
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant0 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant0 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=0 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant1 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant1 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=1 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant2 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant2 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=2 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant3 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant3 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=3 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant4 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant4 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=4 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant5 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant5 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=5 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant6 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant6 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=6 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant7 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant7 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=7 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant8 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant8 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=8 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant9 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant9 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=9 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant10 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant10 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=10 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant11 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant11 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=11 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant12 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant12 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=12 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant13 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant13 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=13 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant14 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant14 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=14 |
|||
#pragma kernel ShadeOpaque_Indirect_Fptl_Variant15 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Fptl_Variant15 USE_FPTL_LIGHTLIST USE_INDIRECT VARIANT=15 |
|||
|
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant0 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant0 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=0 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant1 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant1 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=1 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant2 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant2 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=2 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant3 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant3 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=3 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant4 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant4 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=4 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant5 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant5 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=5 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant6 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant6 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=6 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant7 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant7 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=7 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant8 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant8 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=8 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant9 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant9 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=9 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant10 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant10 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=10 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant11 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant11 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=11 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant12 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant12 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=12 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant13 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant13 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=13 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant14 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant14 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=14 |
|||
#pragma kernel ShadeOpaque_Indirect_Clustered_Variant15 SHADE_OPAQUE_ENTRY=ShadeOpaque_Indirect_Clustered_Variant15 USE_CLUSTERED_LIGHTLIST USE_INDIRECT VARIANT=15 |
|||
|
|||
#pragma #pragma enable_d3d11_debug_symbols |
|||
|
|||
// Split lighting is required for the SSS pass. |
|||
// Not currently possible since we need to access the stencil buffer from the compute shader. |
|||
// #pragma multi_compile _ OUTPUT_SPLIT_LIGHTING |
|||
|
|||
#define LIGHTLOOP_TILE_PASS 1 |
|||
#define LIGHTLOOP_TILE_DIRECT 1 |
|||
#define LIGHTLOOP_TILE_INDIRECT 1 |
|||
#define LIGHTLOOP_TILE_ALL 1 |
|||
|
|||
//------------------------------------------------------------------------------------- |
|||
// Include |
|||
//------------------------------------------------------------------------------------- |
|||
|
|||
#include "../../../ShaderLibrary/Common.hlsl" |
|||
#include "../../Debug/DebugDisplay.hlsl" |
|||
|
|||
// Note: We have fix as guidelines that we have only one deferred material (with control of GBuffer enabled). Mean a users that add a new |
|||
// deferred material must replace the old one here. If in the future we want to support multiple layout (cause a lot of consistency problem), |
|||
// the deferred shader will require to use multicompile. |
|||
#define UNITY_MATERIAL_LIT // Need to be define before including Material.hlsl |
|||
#include "../../ShaderConfig.cs.hlsl" |
|||
#include "../../ShaderVariables.hlsl" |
|||
#include "../../Lighting/Lighting.hlsl" // This include Material.hlsl |
|||
#include "../../Lighting/TilePass/FeatureFlags.hlsl" |
|||
//------------------------------------------------------------------------------------- |
|||
// variable declaration |
|||
//------------------------------------------------------------------------------------- |
|||
|
|||
DECLARE_GBUFFER_TEXTURE(_GBufferTexture); |
|||
|
|||
#ifdef OUTPUT_SPLIT_LIGHTING |
|||
RWTexture2D<float4> specularLightingUAV; |
|||
RWTexture2D<float3> diffuseLightingUAV; |
|||
#else |
|||
RWTexture2D<float4> combinedLightingUAV; |
|||
#endif |
|||
|
|||
#if USE_INDIRECT |
|||
uint g_TileListOffset; |
|||
StructuredBuffer<uint> g_TileList; |
|||
// Indirect |
|||
[numthreads(16, 16, 1)] |
|||
void SHADE_OPAQUE_ENTRY(uint2 groupThreadId : SV_GroupThreadID, uint groupId : SV_GroupID) |
|||
{ |
|||
uint tileIndex = g_TileList[g_TileListOffset + groupId]; |
|||
uint2 tileCoord = uint2(tileIndex & 0xFFFF, tileIndex >> 16); |
|||
uint2 pixelCoord = tileCoord * GetTileSize() + groupThreadId; |
|||
|
|||
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, tileCoord); |
|||
uint featureFlags = TileVariantToFeatureFlags(VARIANT); |
|||
#else |
|||
// Direct |
|||
[numthreads(16, 16, 1)] |
|||
void SHADE_OPAQUE_ENTRY(uint2 dispatchThreadId : SV_DispatchThreadID, uint2 groupId : SV_GroupID) |
|||
{ |
|||
uint2 pixelCoord = dispatchThreadId; |
|||
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, groupId); |
|||
uint featureFlags = 0xFFFFFFFF; |
|||
#endif |
|||
|
|||
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.unPositionSS).x; |
|||
UpdatePositionInput(depth, _InvViewProjMatrix, _ViewProjMatrix, posInput); |
|||
float3 V = GetWorldSpaceNormalizeViewDir(posInput.positionWS); |
|||
|
|||
FETCH_GBUFFER(gbuffer, _GBufferTexture, posInput.unPositionSS); |
|||
BSDFData bsdfData; |
|||
float3 bakeDiffuseLighting; |
|||
DECODE_FROM_GBUFFER(gbuffer, featureFlags, bsdfData, bakeDiffuseLighting); |
|||
|
|||
PreLightData preLightData = GetPreLightData(V, posInput, bsdfData); |
|||
|
|||
float3 diffuseLighting; |
|||
float3 specularLighting; |
|||
LightLoop(V, posInput, preLightData, bsdfData, bakeDiffuseLighting, featureFlags, diffuseLighting, specularLighting); |
|||
|
|||
#ifdef OUTPUT_SPLIT_LIGHTING |
|||
specularLightingUAV[pixelCoord] = float4(specularLighting, 1.0); |
|||
diffuseLightingUAV[pixelCoord] = diffuseLighting; |
|||
#else |
|||
combinedLightingUAV[pixelCoord] = float4(diffuseLighting + specularLighting, 1.0); |
|||
#endif |
|||
} |
|||
|
|
|||
fileFormatVersion: 2 |
|||
guid: 26a81e742d594d84db3cb22cd86db51e |
|||
folderAsset: yes |
|||
timeCreated: 1496152766 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!29 &1 |
|||
OcclusionCullingSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 2 |
|||
m_OcclusionBakeSettings: |
|||
smallestOccluder: 5 |
|||
smallestHole: 0.25 |
|||
backfaceThreshold: 100 |
|||
m_SceneGUID: 00000000000000000000000000000000 |
|||
m_OcclusionCullingData: {fileID: 0} |
|||
--- !u!104 &2 |
|||
RenderSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 8 |
|||
m_Fog: 0 |
|||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} |
|||
m_FogMode: 3 |
|||
m_FogDensity: 0.01 |
|||
m_LinearFogStart: 0 |
|||
m_LinearFogEnd: 300 |
|||
m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 0} |
|||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} |
|||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} |
|||
m_AmbientIntensity: 1 |
|||
m_AmbientMode: 1 |
|||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} |
|||
m_SkyboxMaterial: {fileID: 0} |
|||
m_HaloStrength: 0.5 |
|||
m_FlareStrength: 1 |
|||
m_FlareFadeSpeed: 3 |
|||
m_HaloTexture: {fileID: 0} |
|||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} |
|||
m_DefaultReflectionMode: 0 |
|||
m_DefaultReflectionResolution: 128 |
|||
m_ReflectionBounces: 1 |
|||
m_ReflectionIntensity: 1 |
|||
m_CustomReflection: {fileID: 0} |
|||
m_Sun: {fileID: 0} |
|||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} |
|||
--- !u!157 &3 |
|||
LightmapSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 11 |
|||
m_GIWorkflowMode: 0 |
|||
m_GISettings: |
|||
serializedVersion: 2 |
|||
m_BounceScale: 1 |
|||
m_IndirectOutputScale: 1 |
|||
m_AlbedoBoost: 1 |
|||
m_TemporalCoherenceThreshold: 1 |
|||
m_EnvironmentLightingMode: 0 |
|||
m_EnableBakedLightmaps: 1 |
|||
m_EnableRealtimeLightmaps: 0 |
|||
m_LightmapEditorSettings: |
|||
serializedVersion: 9 |
|||
m_Resolution: 2 |
|||
m_BakeResolution: 40 |
|||
m_TextureWidth: 1024 |
|||
m_TextureHeight: 1024 |
|||
m_AO: 1 |
|||
m_AOMaxDistance: 1 |
|||
m_CompAOExponent: 1 |
|||
m_CompAOExponentDirect: 0 |
|||
m_Padding: 2 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_LightmapsBakeMode: 0 |
|||
m_TextureCompression: 1 |
|||
m_FinalGather: 1 |
|||
m_FinalGatherFiltering: 1 |
|||
m_FinalGatherRayCount: 256 |
|||
m_ReflectionCompression: 2 |
|||
m_MixedBakeMode: 1 |
|||
m_BakeBackend: 0 |
|||
m_PVRSampling: 1 |
|||
m_PVRDirectSampleCount: 32 |
|||
m_PVRSampleCount: 500 |
|||
m_PVRBounces: 2 |
|||
m_PVRFiltering: 0 |
|||
m_PVRFilteringMode: 1 |
|||
m_PVRCulling: 1 |
|||
m_PVRFilteringGaussRadiusDirect: 1 |
|||
m_PVRFilteringGaussRadiusIndirect: 5 |
|||
m_PVRFilteringGaussRadiusAO: 2 |
|||
m_PVRFilteringAtrousColorSigma: 1 |
|||
m_PVRFilteringAtrousNormalSigma: 1 |
|||
m_PVRFilteringAtrousPositionSigma: 1 |
|||
m_LightingDataAsset: {fileID: 112000002, guid: b659eb7d7f70e4d4eb5211330bbf8d9c, |
|||
type: 2} |
|||
m_UseShadowmask: 0 |
|||
--- !u!196 &4 |
|||
NavMeshSettings: |
|||
serializedVersion: 2 |
|||
m_ObjectHideFlags: 0 |
|||
m_BuildSettings: |
|||
serializedVersion: 2 |
|||
agentTypeID: 0 |
|||
agentRadius: 0.5 |
|||
agentHeight: 2 |
|||
agentSlope: 45 |
|||
agentClimb: 0.4 |
|||
ledgeDropHeight: 0 |
|||
maxJumpAcrossDistance: 0 |
|||
minRegionArea: 2 |
|||
manualCellSize: 0 |
|||
cellSize: 0.16666667 |
|||
manualTileSize: 0 |
|||
tileSize: 256 |
|||
accuratePlacement: 0 |
|||
debug: |
|||
m_Flags: 0 |
|||
m_NavMeshData: {fileID: 0} |
|||
--- !u!1001 &473298562 |
|||
Prefab: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 2 |
|||
m_Modification: |
|||
m_TransformParent: {fileID: 0} |
|||
m_Modifications: |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_LocalPosition.x |
|||
value: -0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_LocalPosition.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_LocalPosition.z |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_LocalRotation.x |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_LocalRotation.y |
|||
value: -0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_LocalRotation.z |
|||
value: -0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_LocalRotation.w |
|||
value: 1 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_RootOrder |
|||
value: 2 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_LocalScale.x |
|||
value: 1.5 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_LocalScale.y |
|||
value: 1.5 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 400000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_LocalScale.z |
|||
value: 1.5 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2300000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_CastShadows |
|||
value: 2 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 100000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
propertyPath: m_StaticEditorFlags |
|||
value: 4294967295 |
|||
objectReference: {fileID: 0} |
|||
m_RemovedComponents: [] |
|||
m_ParentPrefab: {fileID: 100100000, guid: b56f0b54c8a1042f3ae9a8904a576f5d, type: 3} |
|||
m_IsPrefabParent: 0 |
|||
--- !u!1 &971756569 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 971756575} |
|||
- component: {fileID: 971756574} |
|||
- component: {fileID: 971756573} |
|||
- component: {fileID: 971756572} |
|||
- component: {fileID: 971756571} |
|||
- component: {fileID: 971756570} |
|||
m_Layer: 0 |
|||
m_Name: Main Camera |
|||
m_TagString: MainCamera |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &971756570 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 971756569} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: c20dfc007a9a74ad8a2bfd0d59abe398, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
renderPipeline: {fileID: 11400000, guid: 877878ed40e8ad94095582ff91179016, type: 2} |
|||
cameraToUse: {fileID: 971756574} |
|||
hdr: 0 |
|||
width: 1280 |
|||
height: 720 |
|||
--- !u!81 &971756571 |
|||
AudioListener: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 971756569} |
|||
m_Enabled: 1 |
|||
--- !u!124 &971756572 |
|||
Behaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 971756569} |
|||
m_Enabled: 1 |
|||
--- !u!92 &971756573 |
|||
Behaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 971756569} |
|||
m_Enabled: 1 |
|||
--- !u!20 &971756574 |
|||
Camera: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 971756569} |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_ClearFlags: 2 |
|||
m_BackGroundColor: {r: 0.2509804, g: 0.2509804, b: 0.2509804, a: 1} |
|||
m_NormalizedViewPortRect: |
|||
serializedVersion: 2 |
|||
x: 0 |
|||
y: 0 |
|||
width: 1 |
|||
height: 1 |
|||
near clip plane: 0.3 |
|||
far clip plane: 10 |
|||
field of view: 30 |
|||
orthographic: 0 |
|||
orthographic size: 1 |
|||
m_Depth: -1 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_RenderingPath: -1 |
|||
m_TargetTexture: {fileID: 0} |
|||
m_TargetDisplay: 0 |
|||
m_TargetEye: 3 |
|||
m_HDR: 0 |
|||
m_AllowMSAA: 0 |
|||
m_ForceIntoRT: 0 |
|||
m_OcclusionCulling: 1 |
|||
m_StereoConvergence: 10 |
|||
m_StereoSeparation: 0.022 |
|||
m_StereoMirrorMode: 0 |
|||
--- !u!4 &971756575 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 971756569} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 1.5, z: -6} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &1161206970 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 1161206972} |
|||
- component: {fileID: 1161206971} |
|||
m_Layer: 0 |
|||
m_Name: Directional Light |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 4294967295 |
|||
m_IsActive: 1 |
|||
--- !u!108 &1161206971 |
|||
Light: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1161206970} |
|||
m_Enabled: 1 |
|||
serializedVersion: 8 |
|||
m_Type: 1 |
|||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
|||
m_Intensity: 1 |
|||
m_Range: 10 |
|||
m_SpotAngle: 30 |
|||
m_CookieSize: 10 |
|||
m_Shadows: |
|||
m_Type: 2 |
|||
m_Resolution: -1 |
|||
m_CustomResolution: -1 |
|||
m_Strength: 1 |
|||
m_Bias: 0.05 |
|||
m_NormalBias: 0.4 |
|||
m_NearPlane: 0.2 |
|||
m_Cookie: {fileID: 0} |
|||
m_DrawHalo: 0 |
|||
m_Flare: {fileID: 0} |
|||
m_RenderMode: 0 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_Lightmapping: 2 |
|||
m_AreaSize: {x: 1, y: 1} |
|||
m_BounceIntensity: 1 |
|||
m_FalloffTable: |
|||
m_Table[0]: 0 |
|||
m_Table[1]: 0 |
|||
m_Table[2]: 0 |
|||
m_Table[3]: 0 |
|||
m_Table[4]: 0 |
|||
m_Table[5]: 0 |
|||
m_Table[6]: 0 |
|||
m_Table[7]: 0 |
|||
m_Table[8]: 0 |
|||
m_Table[9]: 0 |
|||
m_Table[10]: 0 |
|||
m_Table[11]: 0 |
|||
m_Table[12]: 0 |
|||
m_ColorTemperature: 6570 |
|||
m_UseColorTemperature: 0 |
|||
m_ShadowRadius: 0 |
|||
m_ShadowAngle: 5 |
|||
--- !u!4 &1161206972 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1161206970} |
|||
m_LocalRotation: {x: 0.7132504, y: 0, z: 0, w: 0.7009094} |
|||
m_LocalPosition: {x: 0, y: 3, z: 0} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 1 |
|||
m_LocalEulerAnglesHint: {x: 91, y: 0, z: 0} |
|||
--- !u!1 &1354589631 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 1354589635} |
|||
- component: {fileID: 1354589634} |
|||
- component: {fileID: 1354589633} |
|||
- component: {fileID: 1354589632} |
|||
m_Layer: 0 |
|||
m_Name: Sphere |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 4294967295 |
|||
m_IsActive: 1 |
|||
--- !u!23 &1354589632 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1354589631} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 4fe532de4bae248f4bfff4daa180fa2d, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 1 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
--- !u!135 &1354589633 |
|||
SphereCollider: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1354589631} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Radius: 0.5 |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!33 &1354589634 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1354589631} |
|||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} |
|||
--- !u!4 &1354589635 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1354589631} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 1.511, z: 0} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 4 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &1755136017 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 1755136019} |
|||
- component: {fileID: 1755136018} |
|||
m_Layer: 0 |
|||
m_Name: TEMPLIGHT_DELETE ME |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!108 &1755136018 |
|||
Light: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1755136017} |
|||
m_Enabled: 1 |
|||
serializedVersion: 8 |
|||
m_Type: 1 |
|||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
|||
m_Intensity: 0.001 |
|||
m_Range: 10 |
|||
m_SpotAngle: 30 |
|||
m_CookieSize: 10 |
|||
m_Shadows: |
|||
m_Type: 1 |
|||
m_Resolution: -1 |
|||
m_CustomResolution: -1 |
|||
m_Strength: 1 |
|||
m_Bias: 0.05 |
|||
m_NormalBias: 0.4 |
|||
m_NearPlane: 0.2 |
|||
m_Cookie: {fileID: 0} |
|||
m_DrawHalo: 0 |
|||
m_Flare: {fileID: 0} |
|||
m_RenderMode: 0 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_Lightmapping: 4 |
|||
m_AreaSize: {x: 1, y: 1} |
|||
m_BounceIntensity: 1 |
|||
m_FalloffTable: |
|||
m_Table[0]: 0 |
|||
m_Table[1]: 0 |
|||
m_Table[2]: 0 |
|||
m_Table[3]: 0 |
|||
m_Table[4]: 0 |
|||
m_Table[5]: 0 |
|||
m_Table[6]: 0 |
|||
m_Table[7]: 0 |
|||
m_Table[8]: 0 |
|||
m_Table[9]: 0 |
|||
m_Table[10]: 0 |
|||
m_Table[11]: 0 |
|||
m_Table[12]: 0 |
|||
m_ColorTemperature: 6570 |
|||
m_UseColorTemperature: 0 |
|||
m_ShadowRadius: 0 |
|||
m_ShadowAngle: 0 |
|||
--- !u!4 &1755136019 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1755136017} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 1.2441416, y: 3.61, z: -3.0811512} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 3 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: e23c793ace3c4a146a73360af1600fbd |
|||
timeCreated: 1493306791 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using System; |
|||
|
|||
#if UNITY_EDITOR
|
|||
using UnityEditor; |
|||
#endif
|
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
public abstract class DebugItemHandler |
|||
{ |
|||
protected DebugItem m_DebugItem = null; |
|||
|
|||
public void SetDebugItem(DebugItem item) |
|||
{ |
|||
m_DebugItem = item; |
|||
} |
|||
|
|||
// Method user needs to override for specific value clamping.
|
|||
public virtual void ClampValues(Func<object> getter, Action<object> setter) {} |
|||
// Method that will create UI items for runtime debug menu.
|
|||
public abstract DebugItemUI BuildGUI(GameObject parent); |
|||
|
|||
#if UNITY_EDITOR
|
|||
// Method users need to override for editor specific UI
|
|||
public abstract bool OnEditorGUIImpl(); |
|||
public void OnEditorGUI() |
|||
{ |
|||
if(OnEditorGUIImpl()) |
|||
{ |
|||
DebugMenuUI.changed = true; |
|||
} |
|||
} |
|||
#endif
|
|||
|
|||
// Method users need to override for specific serialization of custom types.
|
|||
public abstract DebugItemState CreateDebugItemState(); |
|||
} |
|||
|
|||
// This is the default debug item handler that handles all basic types.
|
|||
public class DefaultDebugItemHandler |
|||
: DebugItemHandler |
|||
{ |
|||
bool m_IsInitialized = false; |
|||
|
|||
// Label for simple GUI items
|
|||
protected GUIContent m_Label; |
|||
|
|||
// Values and strings for Enum items
|
|||
protected List<GUIContent> m_EnumStrings = null; |
|||
protected List<int> m_EnumValues = null; |
|||
|
|||
public void Initialize() |
|||
{ |
|||
if (m_IsInitialized) |
|||
return; |
|||
|
|||
m_Label = new GUIContent(m_DebugItem.name); |
|||
Type itemType = m_DebugItem.GetItemType(); |
|||
if(itemType.BaseType == typeof(System.Enum)) |
|||
{ |
|||
Array arr = Enum.GetValues(itemType); |
|||
m_EnumStrings = new List<GUIContent>(arr.Length); |
|||
m_EnumValues = new List<int>(arr.Length); |
|||
|
|||
foreach(var value in arr) |
|||
{ |
|||
m_EnumStrings.Add(new GUIContent(value.ToString())); |
|||
m_EnumValues.Add((int)value); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public override DebugItemState CreateDebugItemState() |
|||
{ |
|||
DebugItemState newItemState = null; |
|||
if (m_DebugItem.GetItemType() == typeof(bool)) |
|||
{ |
|||
newItemState = ScriptableObject.CreateInstance<DebugItemStateBool>(); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(int)) |
|||
{ |
|||
newItemState = ScriptableObject.CreateInstance<DebugItemStateInt>(); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(uint)) |
|||
{ |
|||
newItemState = ScriptableObject.CreateInstance<DebugItemStateUInt>(); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(float)) |
|||
{ |
|||
newItemState = ScriptableObject.CreateInstance<DebugItemStateFloat>(); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(Color)) |
|||
{ |
|||
newItemState = ScriptableObject.CreateInstance<DebugItemStateColor>(); |
|||
} |
|||
else if (m_DebugItem.GetItemType().BaseType == typeof(System.Enum)) |
|||
{ |
|||
newItemState = ScriptableObject.CreateInstance<DebugItemStateInt>(); // Need to be serialized as int. For some reason serialization of the Enum directly just fails...
|
|||
} |
|||
|
|||
return newItemState; |
|||
} |
|||
|
|||
public override DebugItemUI BuildGUI(GameObject parent) |
|||
{ |
|||
Initialize(); |
|||
|
|||
DebugItemUI newItemUI = null; |
|||
if (m_DebugItem.GetItemType() == typeof(bool)) |
|||
{ |
|||
newItemUI = new DebugBoolItemUI(parent, m_DebugItem, m_Label.text); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(int)) |
|||
{ |
|||
newItemUI = new DebugIntItemUI(parent, m_DebugItem, m_Label.text); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(uint)) |
|||
{ |
|||
newItemUI = new DebugUIntItemUI(parent, m_DebugItem, m_Label.text); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(float)) |
|||
{ |
|||
newItemUI = new DebugFloatItemUI(parent, m_DebugItem, m_Label.text); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(Color)) |
|||
{ |
|||
newItemUI = new DebugColorItemUI(parent, m_DebugItem, m_Label.text); |
|||
} |
|||
else if (m_DebugItem.GetItemType().BaseType == typeof(System.Enum)) |
|||
{ |
|||
newItemUI = new DebugEnumItemUI(parent, m_DebugItem, m_Label.text, m_EnumStrings.ToArray(), m_EnumValues.ToArray()); |
|||
} |
|||
|
|||
return newItemUI; |
|||
} |
|||
|
|||
#if UNITY_EDITOR
|
|||
bool DrawBoolItem() |
|||
{ |
|||
bool value = (bool)m_DebugItem.GetValue(); |
|||
|
|||
EditorGUI.BeginChangeCheck(); |
|||
value = EditorGUILayout.Toggle(m_Label, value); |
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
m_DebugItem.SetValue(value); |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
bool DrawIntItem() |
|||
{ |
|||
int value = (int)m_DebugItem.GetValue(); |
|||
EditorGUI.BeginChangeCheck(); |
|||
value = EditorGUILayout.IntField(m_Label, value); |
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
m_DebugItem.SetValue(value); |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
bool DrawUIntItem() |
|||
{ |
|||
int value = (int)(uint)m_DebugItem.GetValue(); |
|||
EditorGUI.BeginChangeCheck(); |
|||
value = EditorGUILayout.IntField(m_Label, value); |
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
value = System.Math.Max(0, value); |
|||
m_DebugItem.SetValue((uint)value); |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
bool DrawFloatItem() |
|||
{ |
|||
float value = (float)m_DebugItem.GetValue(); |
|||
EditorGUI.BeginChangeCheck(); |
|||
value = EditorGUILayout.FloatField(m_Label, value); |
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
m_DebugItem.SetValue(value); |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
bool DrawColorItem() |
|||
{ |
|||
EditorGUI.BeginChangeCheck(); |
|||
Color value = EditorGUILayout.ColorField(m_Label, (Color)m_DebugItem.GetValue()); |
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
m_DebugItem.SetValue(value); |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
bool DrawEnumItem() |
|||
{ |
|||
EditorGUI.BeginChangeCheck(); |
|||
int value = EditorGUILayout.IntPopup(m_Label, (int)m_DebugItem.GetValue(), m_EnumStrings.ToArray(), m_EnumValues.ToArray()); |
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
m_DebugItem.SetValue(value); |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
public override bool OnEditorGUIImpl() |
|||
{ |
|||
Initialize(); |
|||
|
|||
if (m_DebugItem.readOnly) |
|||
{ |
|||
EditorGUILayout.LabelField(m_Label, new GUIContent(m_DebugItem.GetValue().ToString())); |
|||
return false; |
|||
} |
|||
|
|||
if (m_DebugItem.GetItemType() == typeof(bool)) |
|||
{ |
|||
return DrawBoolItem(); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(int)) |
|||
{ |
|||
return DrawIntItem(); |
|||
} |
|||
else if(m_DebugItem.GetItemType() == typeof(uint)) |
|||
{ |
|||
return DrawUIntItem(); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(float)) |
|||
{ |
|||
return DrawFloatItem(); |
|||
} |
|||
else if (m_DebugItem.GetItemType() == typeof(Color)) |
|||
{ |
|||
return DrawColorItem(); |
|||
} |
|||
else if (m_DebugItem.GetItemType().BaseType == typeof(System.Enum)) |
|||
{ |
|||
return DrawEnumItem(); |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
#endif
|
|||
} |
|||
|
|||
public class DebugItemHandlerFloatMinMax |
|||
: DefaultDebugItemHandler |
|||
{ |
|||
float m_Min = 0.0f; |
|||
float m_Max = 1.0f; |
|||
public DebugItemHandlerFloatMinMax(float min, float max) |
|||
{ |
|||
m_Min = min; |
|||
m_Max = max; |
|||
} |
|||
|
|||
public override void ClampValues(Func<object> getter, Action<object> setter) |
|||
{ |
|||
setter(Mathf.Clamp((float)getter(), m_Min, m_Max)); |
|||
} |
|||
|
|||
#if UNITY_EDITOR
|
|||
public override bool OnEditorGUIImpl() |
|||
{ |
|||
Initialize(); |
|||
|
|||
EditorGUI.BeginChangeCheck(); |
|||
float value = EditorGUILayout.Slider(m_DebugItem.name, (float)m_DebugItem.GetValue(), m_Min, m_Max); |
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
m_DebugItem.SetValue(value); |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
#endif
|
|||
} |
|||
|
|||
public class DebugItemHandlerIntEnum |
|||
: DefaultDebugItemHandler |
|||
{ |
|||
GUIContent[] m_IntEnumStrings = null; |
|||
int[] m_IntEnumValues = null; |
|||
|
|||
public DebugItemHandlerIntEnum(GUIContent[] enumStrings, int[] enumValues) |
|||
{ |
|||
m_IntEnumStrings = enumStrings; |
|||
m_IntEnumValues = enumValues; |
|||
} |
|||
|
|||
public override DebugItemUI BuildGUI(GameObject parent) |
|||
{ |
|||
Initialize(); |
|||
|
|||
return new DebugEnumItemUI(parent, m_DebugItem, m_Label.text, m_IntEnumStrings, m_IntEnumValues); |
|||
} |
|||
|
|||
#if UNITY_EDITOR
|
|||
public override bool OnEditorGUIImpl() |
|||
{ |
|||
Initialize(); |
|||
|
|||
UnityEditor.EditorGUI.BeginChangeCheck(); |
|||
int value = UnityEditor.EditorGUILayout.IntPopup(m_Label, (int)m_DebugItem.GetValue(), m_IntEnumStrings, m_IntEnumValues); |
|||
if (UnityEditor.EditorGUI.EndChangeCheck()) |
|||
{ |
|||
m_DebugItem.SetValue(value); |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
#endif
|
|||
} |
|||
|
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
// Class that users need to extend for runtime debug menu item UI
|
|||
public abstract class DebugItemUI |
|||
{ |
|||
protected GameObject m_Root = null; |
|||
protected DebugItem m_DebugItem = null; |
|||
|
|||
public bool dynamicDisplay { get { return m_DebugItem.dynamicDisplay; } } |
|||
|
|||
protected DebugItemUI(DebugItem debugItem) |
|||
{ |
|||
m_DebugItem = debugItem; |
|||
} |
|||
|
|||
// Implement for selection specific beahavior (like changing color for example)
|
|||
public abstract void SetSelected(bool value); |
|||
// Implement behavior when user execute the "Validate" action
|
|||
public abstract void OnValidate(); |
|||
// Implement behavior when user execute the "Increment" action
|
|||
public abstract void OnIncrement(); |
|||
// Implement behavior when user execute the "Decrement" action
|
|||
public abstract void OnDecrement(); |
|||
// Implement this method to update the UI with current item value.
|
|||
// User must call it whenever Validate/Increment/Decrement is called. It will also be automatically called for dynamically displayed items.
|
|||
public abstract void Update(); |
|||
} |
|||
|
|||
public class DebugSimpleItemUI : DebugItemUI |
|||
{ |
|||
protected GameObject m_Name = null; |
|||
protected GameObject m_Value = null; |
|||
|
|||
protected DebugSimpleItemUI(GameObject parent, DebugItem debugItem, string name) |
|||
: base(debugItem) |
|||
{ |
|||
|
|||
m_Root = DebugMenuUI.CreateHorizontalLayoutGroup("", true, true, false, false, parent); |
|||
m_Name = DebugMenuUI.CreateTextElement(m_DebugItem.name, name, 10, TextAnchor.MiddleLeft, m_Root); |
|||
var layoutElem = m_Name.AddComponent<UI.LayoutElement>(); |
|||
layoutElem.minWidth = DebugMenuUI.kDebugItemNameWidth; |
|||
m_Value = DebugMenuUI.CreateTextElement(string.Format("{0} value", name), "", 10, TextAnchor.MiddleLeft, m_Root); |
|||
} |
|||
|
|||
public override void SetSelected(bool value) |
|||
{ |
|||
m_Name.GetComponent<UI.Text>().color = value ? DebugMenuUI.kColorSelected : DebugMenuUI.kColorUnSelected; |
|||
m_Value.GetComponent<UI.Text>().color = value ? DebugMenuUI.kColorSelected : DebugMenuUI.kColorUnSelected; |
|||
} |
|||
|
|||
public override void OnValidate() |
|||
{ |
|||
throw new System.NotImplementedException(); |
|||
} |
|||
|
|||
public override void OnIncrement() |
|||
{ |
|||
throw new System.NotImplementedException(); |
|||
} |
|||
|
|||
public override void OnDecrement() |
|||
{ |
|||
throw new System.NotImplementedException(); |
|||
} |
|||
|
|||
public override void Update() |
|||
{ |
|||
throw new System.NotImplementedException(); |
|||
} |
|||
} |
|||
|
|||
public class DebugBoolItemUI : DebugSimpleItemUI |
|||
{ |
|||
public DebugBoolItemUI(GameObject parent, DebugItem debugItem, string name) |
|||
: base(parent, debugItem, name) |
|||
{ |
|||
Update(); |
|||
} |
|||
|
|||
public override void Update() |
|||
{ |
|||
m_Value.GetComponent<UI.Text>().text = (bool)m_DebugItem.GetValue() ? "True" : "False"; |
|||
} |
|||
|
|||
|
|||
public override void OnValidate() |
|||
{ |
|||
m_DebugItem.SetValue(!(bool)m_DebugItem.GetValue()); |
|||
Update(); |
|||
} |
|||
|
|||
public override void OnIncrement() |
|||
{ |
|||
OnValidate(); |
|||
} |
|||
|
|||
public override void OnDecrement() |
|||
{ |
|||
OnValidate(); |
|||
} |
|||
} |
|||
|
|||
public class DebugFloatItemUI : DebugSimpleItemUI |
|||
{ |
|||
bool m_SelectIncrementMode = false; |
|||
int m_CurrentIncrementIndex = -1; |
|||
|
|||
public DebugFloatItemUI(GameObject parent, DebugItem debugItem, string name) |
|||
: base(parent, debugItem, name) |
|||
{ |
|||
Update(); |
|||
} |
|||
|
|||
public override void Update() |
|||
{ |
|||
float currentValue = (float)m_DebugItem.GetValue(); |
|||
bool isNegative = currentValue < 0.0f; |
|||
// Easier to format the string without caring about the '-' sign. We add it back at the end
|
|||
currentValue = Mathf.Abs(currentValue); |
|||
|
|||
char separator = System.Convert.ToChar(System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator); |
|||
|
|||
// Start with the maximum amount of trailing zeros
|
|||
string valueWithMaxDecimals = string.Format("{0:0.00000}", currentValue); |
|||
|
|||
// Remove trailing zeros until we reach the separator or we reach the decimal we are currently editing.
|
|||
int separatorIndex = valueWithMaxDecimals.LastIndexOf(separator); |
|||
int index = valueWithMaxDecimals.Length - 1; |
|||
while ( |
|||
valueWithMaxDecimals[index] == '0' // Remove trailing zeros
|
|||
&& index > (separatorIndex + 1) // until we reach the separator
|
|||
&& index > (System.Math.Abs(m_CurrentIncrementIndex) + separatorIndex)) // Or it's the index of the current decimal being edited (so as to display the last trailing zero in this case)
|
|||
{ |
|||
index--; |
|||
} |
|||
|
|||
string finalValue = new string(valueWithMaxDecimals.ToCharArray(), 0, index + 1); |
|||
|
|||
// Add leading zeros until we reach where the current order is being edited.
|
|||
if(m_CurrentIncrementIndex > 0) |
|||
{ |
|||
float incrementValue = Mathf.Pow(10.0f, (float)m_CurrentIncrementIndex); |
|||
if(incrementValue > currentValue) |
|||
{ |
|||
float compareValue = currentValue + 1.0f; // Start at 1.0f because we know that we are going to increment by 10 or more
|
|||
while (incrementValue > compareValue) |
|||
{ |
|||
finalValue = finalValue.Insert(0, "0"); |
|||
compareValue *= 10.0f; |
|||
} |
|||
} |
|||
} |
|||
|
|||
// When selecting which decimal/order you want to edit, we show brackets around the figure to show the user.
|
|||
if(m_SelectIncrementMode) |
|||
{ |
|||
separatorIndex = finalValue.LastIndexOf(separator); // separator may have changed place if we added leading zeros
|
|||
int bracketIndex = separatorIndex - m_CurrentIncrementIndex; |
|||
if(m_CurrentIncrementIndex >= 0) // Skip separator
|
|||
bracketIndex -= 1; |
|||
|
|||
finalValue = finalValue.Insert(bracketIndex, "["); |
|||
finalValue = finalValue.Insert(bracketIndex + 2, "]"); |
|||
} |
|||
|
|||
if(isNegative) |
|||
finalValue = finalValue.Insert(0, "-"); |
|||
|
|||
m_Value.GetComponent<UI.Text>().text = finalValue; |
|||
} |
|||
|
|||
public override void OnValidate() |
|||
{ |
|||
m_SelectIncrementMode = !m_SelectIncrementMode; |
|||
Update(); |
|||
} |
|||
|
|||
public override void OnIncrement() |
|||
{ |
|||
if(!m_SelectIncrementMode) |
|||
{ |
|||
m_DebugItem.SetValue((float)m_DebugItem.GetValue() + Mathf.Pow(10.0f, (float)m_CurrentIncrementIndex)); |
|||
} |
|||
else |
|||
{ |
|||
m_CurrentIncrementIndex -= 1; // * 0.1 (10^m_CurrentIncrementIndex)
|
|||
m_CurrentIncrementIndex = System.Math.Max(-5, m_CurrentIncrementIndex); |
|||
} |
|||
Update(); |
|||
} |
|||
|
|||
public override void OnDecrement() |
|||
{ |
|||
if (!m_SelectIncrementMode) |
|||
{ |
|||
m_DebugItem.SetValue((float)m_DebugItem.GetValue() - Mathf.Pow(10.0f, (float)m_CurrentIncrementIndex)); |
|||
} |
|||
else |
|||
{ |
|||
m_CurrentIncrementIndex += 1; // * 10 (10^m_CurrentIncrementIndex)
|
|||
} |
|||
Update(); |
|||
} |
|||
} |
|||
|
|||
// Everything is done with int. We don't really care about values > 2b for debugging.
|
|||
public class DebugIntegerItemUI : DebugSimpleItemUI |
|||
{ |
|||
bool m_SelectIncrementMode = false; |
|||
int m_CurrentIncrementIndex = 0; |
|||
|
|||
public DebugIntegerItemUI(GameObject parent, DebugItem debugItem, string name) |
|||
: base(parent, debugItem, name) |
|||
{ |
|||
} |
|||
|
|||
protected void UpdateText(int value) |
|||
{ |
|||
bool isNegative = value < 0f; |
|||
// Easier to format the string without caring about the '-' sign. We add it back at the end
|
|||
value = System.Math.Abs(value); |
|||
|
|||
string finalValue = string.Format("{0}", value); |
|||
|
|||
// Add leading zeros until we reach where the current order is being edited.
|
|||
if(m_CurrentIncrementIndex > 0) |
|||
{ |
|||
int incrementValue = (int)System.Math.Pow(10, m_CurrentIncrementIndex); |
|||
if(incrementValue > value) |
|||
{ |
|||
int compareValue = System.Math.Max(value, 1); |
|||
while (incrementValue > compareValue) |
|||
{ |
|||
finalValue = finalValue.Insert(0, "0"); |
|||
compareValue *= 10; |
|||
} |
|||
} |
|||
} |
|||
|
|||
// When selecting which decimal/order you want to edit, we show brackets around the figure to show the user.
|
|||
if(m_SelectIncrementMode) |
|||
{ |
|||
int bracketIndex = finalValue.Length - 1 - m_CurrentIncrementIndex; |
|||
|
|||
finalValue = finalValue.Insert(bracketIndex, "["); |
|||
finalValue = finalValue.Insert(bracketIndex + 2, "]"); |
|||
} |
|||
|
|||
if(isNegative) |
|||
finalValue = finalValue.Insert(0, "-"); |
|||
|
|||
m_Value.GetComponent<UI.Text>().text = finalValue; |
|||
} |
|||
|
|||
protected virtual int GetIntegerValue() |
|||
{ |
|||
throw new System.NotImplementedException(); |
|||
} |
|||
|
|||
protected virtual void SetIntegerValue(int value) |
|||
{ |
|||
throw new System.NotImplementedException(); |
|||
} |
|||
|
|||
public override void Update() |
|||
{ |
|||
UpdateText(GetIntegerValue()); |
|||
} |
|||
|
|||
public override void OnValidate() |
|||
{ |
|||
m_SelectIncrementMode = !m_SelectIncrementMode; |
|||
Update(); |
|||
} |
|||
|
|||
public override void OnIncrement() |
|||
{ |
|||
if (!m_SelectIncrementMode) |
|||
{ |
|||
SetIntegerValue(GetIntegerValue() + (int)Mathf.Pow(10.0f, (float)m_CurrentIncrementIndex)); |
|||
} |
|||
else |
|||
{ |
|||
m_CurrentIncrementIndex -= 1; // *= 0.1 (10^m_CurrentIncrementIndex)
|
|||
m_CurrentIncrementIndex = System.Math.Max(0, m_CurrentIncrementIndex); |
|||
} |
|||
Update(); |
|||
} |
|||
|
|||
public override void OnDecrement() |
|||
{ |
|||
if (!m_SelectIncrementMode) |
|||
{ |
|||
SetIntegerValue(GetIntegerValue() - (int)Mathf.Pow(10.0f, (float)m_CurrentIncrementIndex)); |
|||
} |
|||
else |
|||
{ |
|||
m_CurrentIncrementIndex += 1; // *= 10 (10^m_CurrentIncrementIndex)
|
|||
m_CurrentIncrementIndex = System.Math.Max(0, m_CurrentIncrementIndex); |
|||
} |
|||
Update(); |
|||
} |
|||
} |
|||
public class DebugIntItemUI : DebugIntegerItemUI |
|||
{ |
|||
public DebugIntItemUI(GameObject parent, DebugItem debugItem, string name) |
|||
: base(parent, debugItem, name) |
|||
{ |
|||
UpdateText((int)m_DebugItem.GetValue()); |
|||
} |
|||
|
|||
protected override int GetIntegerValue() |
|||
{ |
|||
return (int)m_DebugItem.GetValue(); |
|||
} |
|||
|
|||
protected override void SetIntegerValue(int value) |
|||
{ |
|||
m_DebugItem.SetValue(value); |
|||
} |
|||
} |
|||
|
|||
public class DebugUIntItemUI : DebugIntegerItemUI |
|||
{ |
|||
public DebugUIntItemUI(GameObject parent, DebugItem debugItem, string name) |
|||
: base(parent, debugItem, name) |
|||
{ |
|||
UpdateText((int)(uint)m_DebugItem.GetValue()); |
|||
} |
|||
|
|||
protected override int GetIntegerValue() |
|||
{ |
|||
return (int)(uint)m_DebugItem.GetValue(); |
|||
} |
|||
|
|||
protected override void SetIntegerValue(int value) |
|||
{ |
|||
m_DebugItem.SetValue((uint)System.Math.Max(0, value)); |
|||
} |
|||
} |
|||
|
|||
public class DebugEnumItemUI : DebugSimpleItemUI |
|||
{ |
|||
int m_CurrentValueIndex = 0; |
|||
GUIContent[] m_ValueNames; |
|||
int[] m_Values; |
|||
|
|||
public DebugEnumItemUI(GameObject parent, DebugItem debugItem, string name, GUIContent[] valueNames, int[] values) |
|||
: base(parent, debugItem, name) |
|||
{ |
|||
m_Values = values; |
|||
m_ValueNames = valueNames; |
|||
m_CurrentValueIndex = FindIndexForValue((int)m_DebugItem.GetValue()); |
|||
|
|||
Update(); |
|||
} |
|||
|
|||
private int FindIndexForValue(int value) |
|||
{ |
|||
for(int i = 0 ; i < m_Values.Length ; ++i) |
|||
{ |
|||
if (m_Values[i] == value) |
|||
return i; |
|||
} |
|||
|
|||
return -1; |
|||
} |
|||
|
|||
public override void Update() |
|||
{ |
|||
if(m_CurrentValueIndex != -1) |
|||
{ |
|||
m_Value.GetComponent<UI.Text>().text = m_ValueNames[m_CurrentValueIndex].text; |
|||
} |
|||
} |
|||
|
|||
public override void OnValidate() |
|||
{ |
|||
OnIncrement(); |
|||
} |
|||
|
|||
public override void OnIncrement() |
|||
{ |
|||
m_CurrentValueIndex = (m_CurrentValueIndex + 1) % m_Values.Length; |
|||
m_DebugItem.SetValue(m_Values[m_CurrentValueIndex]); |
|||
Update(); |
|||
} |
|||
|
|||
public override void OnDecrement() |
|||
{ |
|||
m_CurrentValueIndex -= 1; |
|||
if (m_CurrentValueIndex < 0) |
|||
m_CurrentValueIndex = m_Values.Length - 1; |
|||
|
|||
m_DebugItem.SetValue(m_Values[m_CurrentValueIndex]); |
|||
Update(); |
|||
} |
|||
} |
|||
|
|||
public class DebugColorItemUI : DebugItemUI |
|||
{ |
|||
protected GameObject m_Name = null; |
|||
protected GameObject m_ColorRect = null; |
|||
|
|||
public DebugColorItemUI(GameObject parent, DebugItem debugItem, string name) |
|||
: base(debugItem) |
|||
{ |
|||
m_DebugItem = debugItem; |
|||
|
|||
m_Root = DebugMenuUI.CreateHorizontalLayoutGroup(name, true, true, false, false, parent); |
|||
|
|||
m_Name = DebugMenuUI.CreateTextElement(m_DebugItem.name, name, 10, TextAnchor.MiddleLeft, m_Root); |
|||
var layoutElemName = m_Name.AddComponent<UI.LayoutElement>(); |
|||
layoutElemName.minWidth = DebugMenuUI.kDebugItemNameWidth; |
|||
|
|||
// Force layout because we need the right height for the color rect element afterward.
|
|||
UI.LayoutRebuilder.ForceRebuildLayoutImmediate(m_Root.GetComponent<RectTransform>()); |
|||
RectTransform nameRect = m_Name.GetComponent<RectTransform>(); |
|||
|
|||
m_ColorRect = new GameObject(); |
|||
m_ColorRect.transform.SetParent(m_Root.transform, false); |
|||
m_ColorRect.AddComponent<UI.Image>(); |
|||
UI.LayoutElement layoutElem = m_ColorRect.AddComponent<UI.LayoutElement>(); |
|||
// We need to set min width/height because without an image, the size would be zero.
|
|||
layoutElem.minHeight = nameRect.rect.height; |
|||
layoutElem.minWidth = 40.0f; |
|||
|
|||
Update(); |
|||
} |
|||
|
|||
public override void Update() |
|||
{ |
|||
Color currentValue = (Color)m_DebugItem.GetValue(); |
|||
UI.Image image = m_ColorRect.GetComponent<UI.Image>(); |
|||
image.color = currentValue; |
|||
} |
|||
|
|||
public override void SetSelected(bool value) |
|||
{ |
|||
m_Name.GetComponent<UI.Text>().color = value ? DebugMenuUI.kColorSelected : DebugMenuUI.kColorUnSelected; |
|||
} |
|||
|
|||
// TODO: Edit mode!
|
|||
public override void OnValidate() |
|||
{ |
|||
} |
|||
|
|||
public override void OnIncrement() |
|||
{ |
|||
} |
|||
|
|||
public override void OnDecrement() |
|||
{ |
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using System; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
[Serializable] |
|||
public abstract class DebugItemState |
|||
: ScriptableObject |
|||
{ |
|||
public DebugItemState() |
|||
{ |
|||
|
|||
} |
|||
|
|||
public string panelName = ""; |
|||
public string itemName = ""; |
|||
|
|||
public abstract void UpdateDebugItemValue(); |
|||
public abstract void SetValue(object value); |
|||
|
|||
public void Initialize(string itemName, string panelName) |
|||
{ |
|||
this.panelName = panelName; |
|||
this.itemName = itemName; |
|||
} |
|||
} |
|||
|
|||
public class DebugItemState<T> : DebugItemState |
|||
{ |
|||
public T value; |
|||
|
|||
public override void SetValue(object value) |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
UnityEditor.Undo.RecordObject(this, "DebugMenu State Update"); |
|||
UnityEditor.EditorUtility.SetDirty(this); |
|||
#endif
|
|||
this.value = (T)value; |
|||
} |
|||
|
|||
public override void UpdateDebugItemValue() |
|||
{ |
|||
DebugMenuManager dmm = DebugMenuManager.instance; |
|||
DebugPanel menu = dmm.GetDebugPanel(panelName); |
|||
if (menu != null) |
|||
{ |
|||
DebugItem item = menu.GetDebugItem(itemName); |
|||
if (item != null) |
|||
{ |
|||
item.SetValue(value, false); |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
public class DebugMenuState |
|||
: ScriptableObject |
|||
{ |
|||
[SerializeField] |
|||
List<DebugItemState> m_ItemStateList = new List<DebugItemState>(); |
|||
|
|||
public void OnEnable() |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
UnityEditor.Undo.undoRedoPerformed += OnUndoRedoPerformed; |
|||
#endif
|
|||
|
|||
// We need to delay the actual update because at this point, some menus might not be created yet (depending on call order) so we can't update their values.
|
|||
DebugMenuManager.instance.RequireUpdateFromDebugItemState(); |
|||
} |
|||
|
|||
public void OnDisable() |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
UnityEditor.Undo.undoRedoPerformed -= OnUndoRedoPerformed; |
|||
#endif
|
|||
// We check consistency in OnDisable instead of OnEnable because we compare the serialized state to the currently running debug menu so we need to make sure that all debug menu are properly created (which is not the case in OnEnable depending on call order)
|
|||
CheckConsistency(); |
|||
} |
|||
|
|||
|
|||
#if UNITY_EDITOR
|
|||
void OnUndoRedoPerformed() |
|||
{ |
|||
// Maybe check a hash or something? So that we don't do that at each redo...
|
|||
UpdateAllDebugItems(); |
|||
UnityEditorInternal.InternalEditorUtility.RepaintAllViews(); |
|||
} |
|||
#endif
|
|||
|
|||
void CheckConsistency() |
|||
{ |
|||
// Remove all objects that may have been removed from the debug menu since last serialization
|
|||
DebugMenuManager dmm = DebugMenuManager.instance; |
|||
List<DebugItemState> tempList = new List<DebugItemState>(); |
|||
foreach(var itemState in m_ItemStateList) |
|||
{ |
|||
DebugItem item = null; |
|||
DebugPanel menu = dmm.GetDebugPanel(itemState.panelName); |
|||
if(menu != null) |
|||
{ |
|||
item = menu.GetDebugItem(itemState.itemName); |
|||
} |
|||
|
|||
// Item no longer exist, clean up its state from the asset.
|
|||
if (item == null) |
|||
{ |
|||
tempList.Add(itemState); |
|||
} |
|||
} |
|||
|
|||
foreach(var itemState in tempList) |
|||
{ |
|||
m_ItemStateList.Remove(itemState); |
|||
Object.DestroyImmediate(itemState, true); |
|||
} |
|||
} |
|||
|
|||
public void AddDebugItemState(DebugItemState state) |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
UnityEditor.AssetDatabase.AddObjectToAsset(state, this); |
|||
#endif
|
|||
m_ItemStateList.Add(state); |
|||
} |
|||
|
|||
public DebugItemState FindDebugItemState(string itemName, string menuName) |
|||
{ |
|||
return m_ItemStateList.Find(x => x.itemName == itemName && x.panelName == menuName); |
|||
} |
|||
|
|||
public void UpdateAllDebugItems() |
|||
{ |
|||
foreach (var itemState in m_ItemStateList) |
|||
{ |
|||
itemState.UpdateDebugItemValue(); |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: d17031e345b144b4a887f66665be6a2b |
|||
timeCreated: 1495180913 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using System; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
public class DebugItem |
|||
{ |
|||
public Type type { get { return m_Type; } } |
|||
public string name { get { return m_Name; } } |
|||
public DebugItemHandler handler { get { return m_Handler; } } |
|||
public bool dynamicDisplay { get { return m_DynamicDisplay; } } |
|||
public bool readOnly { get { return m_Setter == null; } } |
|||
|
|||
public DebugItem(string name, Type type, Func<object> getter, Action<object> setter, bool dynamicDisplay = false, DebugItemHandler handler = null) |
|||
{ |
|||
m_Type = type; |
|||
m_Setter = setter; |
|||
m_Getter = getter; |
|||
m_Name = name; |
|||
m_Handler = handler; |
|||
m_DynamicDisplay = dynamicDisplay; |
|||
} |
|||
|
|||
public Type GetItemType() |
|||
{ |
|||
return m_Type; |
|||
} |
|||
|
|||
public void SetValue(object value, bool record = true) |
|||
{ |
|||
// Setter can be null for readonly items
|
|||
if(m_Setter != null) |
|||
{ |
|||
m_Setter(value); |
|||
m_Handler.ClampValues(m_Getter, m_Setter); |
|||
|
|||
// Update state for serialization/undo
|
|||
if(record) |
|||
m_State.SetValue(m_Getter()); |
|||
} |
|||
} |
|||
|
|||
public object GetValue() |
|||
{ |
|||
return m_Getter(); |
|||
} |
|||
|
|||
public void SetDebugItemState(DebugItemState state) |
|||
{ |
|||
m_State = state; |
|||
} |
|||
|
|||
Func<object> m_Getter; |
|||
Action<object> m_Setter; |
|||
Type m_Type; |
|||
string m_Name; |
|||
DebugItemHandler m_Handler = null; |
|||
bool m_DynamicDisplay = false; |
|||
DebugItemState m_State = null; |
|||
} |
|||
|
|||
public class DebugPanel |
|||
{ |
|||
public string name { get { return m_Name; } } |
|||
public DebugPanelUI panelUI { get { return m_DebugPanelUI; } } |
|||
public int itemCount { get { return m_Items.Count; } } |
|||
|
|||
protected string m_Name = "Unknown Debug Menu"; |
|||
protected List<DebugItem> m_Items = new List<DebugItem>(); |
|||
protected DebugPanelUI m_DebugPanelUI = null; |
|||
|
|||
protected DebugPanel(string name) |
|||
{ |
|||
m_Name = name; |
|||
} |
|||
|
|||
public DebugItem GetDebugItem(int index) |
|||
{ |
|||
if (index >= m_Items.Count || index < 0) |
|||
return null; |
|||
return m_Items[index]; |
|||
} |
|||
|
|||
public DebugItem GetDebugItem(string name) |
|||
{ |
|||
return m_Items.Find(x => x.name == name); |
|||
} |
|||
|
|||
public bool HasDebugItem(DebugItem debugItem) |
|||
{ |
|||
foreach(var item in m_Items) |
|||
{ |
|||
if (debugItem == item) |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
public void RemoveDebugItem(DebugItem debugItem) |
|||
{ |
|||
m_Items.Remove(debugItem); |
|||
m_DebugPanelUI.RebuildGUI(); |
|||
} |
|||
|
|||
public void AddDebugItem(DebugItem debugItem) |
|||
{ |
|||
m_Items.Add(debugItem); |
|||
m_DebugPanelUI.RebuildGUI(); |
|||
} |
|||
|
|||
public void AddDebugItem<ItemType>(string name, Func<object> getter, Action<object> setter, bool dynamicDisplay = false, DebugItemHandler handler = null) |
|||
{ |
|||
if (handler == null) |
|||
handler = new DefaultDebugItemHandler(); |
|||
DebugItem newItem = new DebugItem(name, typeof(ItemType), getter, setter, dynamicDisplay, handler); |
|||
handler.SetDebugItem(newItem); |
|||
m_Items.Add(newItem); |
|||
|
|||
DebugMenuManager dmm = DebugMenuManager.instance; |
|||
DebugItemState itemState = dmm.FindDebugItemState(name, m_Name); |
|||
if(itemState == null) |
|||
{ |
|||
itemState = handler.CreateDebugItemState(); |
|||
itemState.Initialize(name, m_Name); |
|||
itemState.SetValue(getter()); |
|||
dmm.AddDebugItemState(itemState); |
|||
} |
|||
|
|||
newItem.SetDebugItemState(itemState); |
|||
} |
|||
} |
|||
|
|||
public class DebugPanel<DebugPanelUIClass> |
|||
: DebugPanel where DebugPanelUIClass:DebugPanelUI, new() |
|||
{ |
|||
public DebugPanel(string name) |
|||
: base(name) |
|||
{ |
|||
m_DebugPanelUI = new DebugPanelUIClass(); |
|||
m_DebugPanelUI.SetDebugPanel(this); |
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using System; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
public class DebugPanelUI |
|||
{ |
|||
protected GameObject m_Root = null; |
|||
protected DebugPanel m_DebugPanel = null; |
|||
protected List<DebugItemUI> m_ItemsUI = new List<DebugItemUI>(); |
|||
protected int m_SelectedItem = -1; |
|||
|
|||
public int itemCount { get { return m_ItemsUI.Count; } } |
|||
|
|||
public DebugPanelUI() |
|||
{ |
|||
} |
|||
|
|||
public void SetDebugPanel(DebugPanel panel) |
|||
{ |
|||
m_DebugPanel = panel; |
|||
} |
|||
|
|||
public void BuildGUI(GameObject parent) |
|||
{ |
|||
m_Root = new GameObject(string.Format("{0}", m_DebugPanel.name)); |
|||
m_Root.transform.SetParent(parent.transform); |
|||
m_Root.transform.localPosition = Vector3.zero; |
|||
m_Root.transform.localScale = Vector3.one; |
|||
|
|||
UI.VerticalLayoutGroup menuVL = m_Root.AddComponent<UI.VerticalLayoutGroup>(); |
|||
menuVL.spacing = 5.0f; |
|||
menuVL.childControlWidth = true; |
|||
menuVL.childControlHeight = true; |
|||
menuVL.childForceExpandWidth = true; |
|||
menuVL.childForceExpandHeight = false; |
|||
|
|||
RectTransform menuVLRectTransform = m_Root.GetComponent<RectTransform>(); |
|||
menuVLRectTransform.pivot = new Vector2(0.0f, 0.0f); |
|||
menuVLRectTransform.localPosition = new Vector3(0.0f, 0.0f); |
|||
menuVLRectTransform.anchorMin = new Vector2(0.0f, 0.0f); |
|||
menuVLRectTransform.anchorMax = new Vector2(1.0f, 1.0f); |
|||
|
|||
BuildGUIImpl(m_Root); |
|||
} |
|||
|
|||
public void RebuildGUI() |
|||
{ |
|||
for (int i = 0; i < m_Root.transform.childCount; ++i) |
|||
{ |
|||
Object.DestroyImmediate(m_Root.transform.GetChild(i).gameObject); |
|||
} |
|||
BuildGUIImpl(m_Root); |
|||
} |
|||
|
|||
// Default Implementation: just build all items with provided handler.
|
|||
public virtual void BuildGUIImpl(GameObject parent) |
|||
{ |
|||
DebugMenuUI.CreateTextElement(string.Format("{0} Title", m_DebugPanel.name), m_DebugPanel.name, 14, TextAnchor.MiddleLeft, m_Root); |
|||
|
|||
m_ItemsUI.Clear(); |
|||
for (int i = 0; i < m_DebugPanel.itemCount; i++) |
|||
{ |
|||
DebugItemHandler handler = m_DebugPanel.GetDebugItem(i).handler; // Should never be null, we have at least the default handler
|
|||
m_ItemsUI.Add(handler.BuildGUI(parent)); |
|||
} |
|||
} |
|||
|
|||
#if UNITY_EDITOR
|
|||
// Default implementation for editor UI of a debug panel. Users may override this behavior.
|
|||
// This will just display all items via their specific handlers in a vertical layout.
|
|||
public virtual void OnEditorGUI() |
|||
{ |
|||
using (new UnityEditor.EditorGUILayout.VerticalScope()) |
|||
{ |
|||
for (int i = 0; i < m_DebugPanel.itemCount; ++i) |
|||
{ |
|||
m_DebugPanel.GetDebugItem(i).handler.OnEditorGUI(); |
|||
} |
|||
} |
|||
} |
|||
#endif
|
|||
|
|||
public DebugItem GetSelectedDebugItem() |
|||
{ |
|||
if (m_SelectedItem != -1) |
|||
{ |
|||
return m_DebugPanel.GetDebugItem(m_SelectedItem); |
|||
} |
|||
|
|||
return null; |
|||
} |
|||
|
|||
void SetSelectedItem(int index) |
|||
{ |
|||
if (m_SelectedItem != -1) |
|||
{ |
|||
m_ItemsUI[m_SelectedItem].SetSelected(false); |
|||
} |
|||
|
|||
m_SelectedItem = index; |
|||
m_ItemsUI[m_SelectedItem].SetSelected(true); |
|||
} |
|||
|
|||
public void SetSelected(bool value) |
|||
{ |
|||
m_Root.SetActive(value); |
|||
|
|||
if (value) |
|||
{ |
|||
if (m_SelectedItem == -1) |
|||
{ |
|||
NextItem(); |
|||
} |
|||
else |
|||
SetSelectedItem(m_SelectedItem); |
|||
} |
|||
} |
|||
|
|||
void NextItem() |
|||
{ |
|||
if (m_ItemsUI.Count != 0) |
|||
{ |
|||
int newSelected = (m_SelectedItem + 1) % m_ItemsUI.Count; |
|||
SetSelectedItem(newSelected); |
|||
} |
|||
} |
|||
|
|||
void PreviousItem() |
|||
{ |
|||
if (m_ItemsUI.Count != 0) |
|||
{ |
|||
int newSelected = m_SelectedItem - 1; |
|||
if (newSelected == -1) |
|||
newSelected = m_ItemsUI.Count - 1; |
|||
SetSelectedItem(newSelected); |
|||
} |
|||
} |
|||
|
|||
public void OnMoveHorizontal(float value) |
|||
{ |
|||
if (m_SelectedItem != -1 && !m_DebugPanel.GetDebugItem(m_SelectedItem).readOnly) |
|||
{ |
|||
if (value > 0.0f) |
|||
m_ItemsUI[m_SelectedItem].OnIncrement(); |
|||
else |
|||
m_ItemsUI[m_SelectedItem].OnDecrement(); |
|||
} |
|||
} |
|||
|
|||
public void OnMoveVertical(float value) |
|||
{ |
|||
if (value > 0.0f) |
|||
PreviousItem(); |
|||
else |
|||
NextItem(); |
|||
} |
|||
|
|||
public void OnValidate() |
|||
{ |
|||
if (m_SelectedItem != -1 && !m_DebugPanel.GetDebugItem(m_SelectedItem).readOnly) |
|||
m_ItemsUI[m_SelectedItem].OnValidate(); |
|||
} |
|||
|
|||
public void Update() |
|||
{ |
|||
foreach (var itemUI in m_ItemsUI) |
|||
{ |
|||
if (itemUI.dynamicDisplay) |
|||
itemUI.Update(); |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 7407c6acaa932c34f86414a4a8935f24 |
|||
timeCreated: 1492075547 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: a07168baba11f084daec1edd4032f153 |
|||
folderAsset: yes |
|||
timeCreated: 1495456975 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
#if UNITY_EDITOR
|
|||
using UnityEditor; |
|||
#endif
|
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public class LightingDebugPanelUI |
|||
: DebugPanelUI |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
public override void OnEditorGUI() |
|||
{ |
|||
using (new UnityEditor.EditorGUILayout.VerticalScope()) |
|||
{ |
|||
m_DebugPanel.GetDebugItem("Enable Shadows").handler.OnEditorGUI(); |
|||
|
|||
DebugItem shadowDebug = m_DebugPanel.GetDebugItem("Shadow Debug Mode"); |
|||
shadowDebug.handler.OnEditorGUI(); |
|||
if ((ShadowMapDebugMode)shadowDebug.GetValue() == ShadowMapDebugMode.VisualizeShadowMap) |
|||
{ |
|||
EditorGUI.indentLevel++; |
|||
m_DebugPanel.GetDebugItem("Shadow Map Index").handler.OnEditorGUI(); |
|||
EditorGUI.indentLevel--; |
|||
} |
|||
DebugItem lightingDebugModeItem = m_DebugPanel.GetDebugItem("Lighting Debug Mode"); |
|||
lightingDebugModeItem.handler.OnEditorGUI(); |
|||
if ((DebugLightingMode)lightingDebugModeItem.GetValue() == DebugLightingMode.SpecularLighting) |
|||
{ |
|||
EditorGUI.indentLevel++; |
|||
DebugItem overrideSmoothnessItem = m_DebugPanel.GetDebugItem("Override Smoothness"); |
|||
overrideSmoothnessItem.handler.OnEditorGUI(); |
|||
if ((bool)overrideSmoothnessItem.GetValue()) |
|||
{ |
|||
m_DebugPanel.GetDebugItem("Override Smoothness Value").handler.OnEditorGUI(); |
|||
} |
|||
EditorGUI.indentLevel--; |
|||
} |
|||
else if ((DebugLightingMode)lightingDebugModeItem.GetValue() == DebugLightingMode.DiffuseLighting) |
|||
{ |
|||
EditorGUI.indentLevel++; |
|||
m_DebugPanel.GetDebugItem("Debug Lighting Albedo").handler.OnEditorGUI(); |
|||
EditorGUI.indentLevel--; |
|||
} |
|||
|
|||
DebugItem displaySkyReflecItem = m_DebugPanel.GetDebugItem("Display Sky Reflection"); |
|||
displaySkyReflecItem.handler.OnEditorGUI(); |
|||
if ((bool)displaySkyReflecItem.GetValue()) |
|||
{ |
|||
EditorGUI.indentLevel++; |
|||
m_DebugPanel.GetDebugItem("Sky Reflection Mipmap").handler.OnEditorGUI(); |
|||
EditorGUI.indentLevel--; |
|||
} |
|||
} |
|||
} |
|||
#endif
|
|||
} |
|||
|
|||
public class LightingDebugPanel |
|||
: DebugPanel<LightingDebugPanelUI> |
|||
{ |
|||
public LightingDebugPanel() |
|||
: base("Lighting") |
|||
{ |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 19cc6398a661be547848eb23d58699cf |
|||
timeCreated: 1495638676 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!114 &11400000 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 0} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 0cf1dab834d4ec34195b920ea7bbf9ec, type: 3} |
|||
m_Name: HDRenderPipelineAsset |
|||
m_EditorClassIdentifier: |
|||
m_RenderPipelineResources: {fileID: 11400000, guid: 42086e81f4f0c724f96f7f09cc995354, |
|||
type: 2} |
|||
renderingSettings: |
|||
useForwardRenderingOnly: 0 |
|||
useDepthPrepass: 0 |
|||
sssSettings: |
|||
numProfiles: 1 |
|||
profiles: |
|||
- {fileID: 0} |
|||
tileSettings: |
|||
enableTileAndCluster: 1 |
|||
enableSplitLightEvaluation: 1 |
|||
enableComputeLightEvaluation: 0 |
|||
enableComputeFeatureVariants: 0 |
|||
enableClustered: 1 |
|||
enableFptlForOpaqueWhenClustered: 1 |
|||
enableBigTilePrepass: 1 |
|||
diffuseGlobalDimmer: 1 |
|||
specularGlobalDimmer: 1 |
|||
tileDebugByCategory: 0 |
|||
m_ShadowSettings: |
|||
enabled: 1 |
|||
shadowAtlasWidth: 4096 |
|||
shadowAtlasHeight: 4096 |
|||
maxShadowDistance: 1000 |
|||
directionalLightCascadeCount: 4 |
|||
directionalLightCascades: {x: 0.05, y: 0.2, z: 0.3} |
|||
directionalLightNearPlaneOffset: 5 |
|||
m_TextureSettings: |
|||
spotCookieSize: 128 |
|||
pointCookieSize: 512 |
|||
reflectionCubemapSize: 128 |
|||
m_CommonSettings: |
|||
m_ShadowMaxDistance: 1000 |
|||
m_ShadowCascadeCount: 4 |
|||
m_ShadowCascadeSplit0: 0.05 |
|||
m_ShadowCascadeSplit1: 0.2 |
|||
m_ShadowCascadeSplit2: 0.3 |
|||
m_ShadowNearPlaneOffset: 5 |
|||
m_SkySettings: {fileID: 0} |
|||
m_DefaultDiffuseMaterial: {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, |
|||
type: 2} |
|||
m_DefaultShader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} |
|
|||
fileFormatVersion: 2 |
|||
guid: 449281dd2b4fbee49b8397de0541ea3c |
|||
timeCreated: 1496162200 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 11400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.Rendering; |
|||
using System; |
|||
using System.Linq; |
|||
using UnityEngine.Experimental.PostProcessing; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline.TilePass; |
|||
|
|||
#if UNITY_EDITOR
|
|||
using UnityEditor; |
|||
#endif
|
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
// This HDRenderPipeline assume linear lighting. Don't work with gamma.
|
|||
public class HDRenderPipelineAsset : RenderPipelineAsset |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
const string k_HDRenderPipelinePath = "Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset"; |
|||
|
|||
[MenuItem("RenderPipeline/HDRenderPipeline/Create Pipeline Asset")] |
|||
static void CreateHDRenderPipeline() |
|||
{ |
|||
var instance = CreateInstance<HDRenderPipelineAsset>(); |
|||
AssetDatabase.CreateAsset(instance, k_HDRenderPipelinePath); |
|||
|
|||
// If it exist, load renderPipelineResources
|
|||
instance.renderPipelineResources = AssetDatabase.LoadAssetAtPath<RenderPipelineResources>(RenderPipelineResources.renderPipelineResourcesPath); |
|||
} |
|||
|
|||
[UnityEditor.MenuItem("HDRenderPipeline/Add \"Additional Light Data\" (if not present)")] |
|||
static void AddAdditionalLightData() |
|||
{ |
|||
Light[] lights = FindObjectsOfType(typeof(Light)) as Light[]; |
|||
|
|||
foreach (Light light in lights) |
|||
{ |
|||
// Do not add a component if there already is one.
|
|||
if (light.GetComponent<AdditionalLightData>() == null) |
|||
{ |
|||
light.gameObject.AddComponent<AdditionalLightData>(); |
|||
} |
|||
} |
|||
} |
|||
#endif
|
|||
|
|||
private HDRenderPipelineAsset() |
|||
{ } |
|||
|
|||
protected override IRenderPipeline InternalCreatePipeline() |
|||
{ |
|||
return new HDRenderPipeline(this); |
|||
} |
|||
|
|||
[SerializeField] |
|||
private RenderPipelineResources m_RenderPipelineResources; |
|||
public RenderPipelineResources renderPipelineResources |
|||
{ |
|||
get { return m_RenderPipelineResources; } |
|||
set { m_RenderPipelineResources = value; } |
|||
} |
|||
|
|||
// NOTE: All those properties are public because of how HDRenderPipelineInspector retrieve those properties via serialization/reflection
|
|||
// Doing it this way allow to change parameters name and still retrieve correct serialized value
|
|||
|
|||
// Debugging (Not persistent)
|
|||
public DebugDisplaySettings debugDisplaySettings = new DebugDisplaySettings(); |
|||
|
|||
// Renderer Settings (per project)
|
|||
public RenderingSettings renderingSettings = new RenderingSettings(); |
|||
public SubsurfaceScatteringSettings sssSettings = new SubsurfaceScatteringSettings(); |
|||
public TileSettings tileSettings = new TileSettings(); |
|||
|
|||
// TODO: Following two settings need to be update to the serialization/reflection way like above
|
|||
[SerializeField] |
|||
ShadowSettings m_ShadowSettings = ShadowSettings.Default; |
|||
[SerializeField] |
|||
TextureSettings m_TextureSettings = TextureSettings.Default; |
|||
|
|||
public ShadowSettings shadowSettings |
|||
{ |
|||
get { return m_ShadowSettings; } |
|||
} |
|||
|
|||
public TextureSettings textureSettings |
|||
{ |
|||
get { return m_TextureSettings; } |
|||
set { m_TextureSettings = value; } |
|||
} |
|||
|
|||
// NOTE: Following settings are Asset so they need to be serialized as usual. no reflection/serialization here
|
|||
|
|||
// Renderer Settings (per "scene")
|
|||
[SerializeField] |
|||
private CommonSettings.Settings m_CommonSettings = CommonSettings.Settings.s_Defaultsettings; |
|||
[SerializeField] |
|||
private SkySettings m_SkySettings; |
|||
|
|||
public CommonSettings.Settings commonSettingsToUse |
|||
{ |
|||
get |
|||
{ |
|||
if (CommonSettingsSingleton.overrideSettings) |
|||
return CommonSettingsSingleton.overrideSettings.settings; |
|||
|
|||
return m_CommonSettings; |
|||
} |
|||
} |
|||
|
|||
public SkySettings skySettings |
|||
{ |
|||
get { return m_SkySettings; } |
|||
set { m_SkySettings = value; } |
|||
} |
|||
|
|||
public SkySettings skySettingsToUse |
|||
{ |
|||
get |
|||
{ |
|||
if (SkySettingsSingleton.overrideSettings) |
|||
return SkySettingsSingleton.overrideSettings; |
|||
|
|||
return m_SkySettings; |
|||
} |
|||
} |
|||
|
|||
[SerializeField] |
|||
Material m_DefaultDiffuseMaterial; |
|||
[SerializeField] |
|||
Shader m_DefaultShader; |
|||
|
|||
public Material DefaultDiffuseMaterial |
|||
{ |
|||
get { return m_DefaultDiffuseMaterial; } |
|||
private set { m_DefaultDiffuseMaterial = value; } |
|||
} |
|||
|
|||
public Shader DefaultShader |
|||
{ |
|||
get { return m_DefaultShader; } |
|||
private set { m_DefaultShader = value; } |
|||
} |
|||
|
|||
public override Shader GetDefaultShader() |
|||
{ |
|||
return m_DefaultShader; |
|||
} |
|||
|
|||
public override Material GetDefaultMaterial() |
|||
{ |
|||
return m_DefaultDiffuseMaterial; |
|||
} |
|||
|
|||
public override Material GetDefaultParticleMaterial() |
|||
{ |
|||
return null; |
|||
} |
|||
|
|||
public override Material GetDefaultLineMaterial() |
|||
{ |
|||
return null; |
|||
} |
|||
|
|||
public override Material GetDefaultTerrainMaterial() |
|||
{ |
|||
return null; |
|||
} |
|||
|
|||
public override Material GetDefaultUIMaterial() |
|||
{ |
|||
return null; |
|||
} |
|||
|
|||
public override Material GetDefaultUIOverdrawMaterial() |
|||
{ |
|||
return null; |
|||
} |
|||
|
|||
public override Material GetDefaultUIETC1SupportedMaterial() |
|||
{ |
|||
return null; |
|||
} |
|||
|
|||
public override Material GetDefault2DMaterial() |
|||
{ |
|||
return null; |
|||
} |
|||
|
|||
public void ApplyDebugDisplaySettings() |
|||
{ |
|||
m_ShadowSettings.enabled = debugDisplaySettings.lightingDebugSettings.enableShadows; |
|||
|
|||
LightingDebugSettings lightingDebugSettings = debugDisplaySettings.lightingDebugSettings; |
|||
Vector4 debugAlbedo = new Vector4(lightingDebugSettings.debugLightingAlbedo.r, lightingDebugSettings.debugLightingAlbedo.g, lightingDebugSettings.debugLightingAlbedo.b, 0.0f); |
|||
Vector4 debugSmoothness = new Vector4(lightingDebugSettings.overrideSmoothness ? 1.0f : 0.0f, lightingDebugSettings.overrideSmoothnessValue, 0.0f, 0.0f); |
|||
|
|||
Shader.SetGlobalInt("_DebugViewMaterial", (int)debugDisplaySettings.GetDebugMaterialIndex()); |
|||
Shader.SetGlobalInt("_DebugLightingMode", (int)debugDisplaySettings.GetDebugLightingMode()); |
|||
Shader.SetGlobalVector("_DebugLightingAlbedo", debugAlbedo); |
|||
Shader.SetGlobalVector("_DebugLightingSmoothness", debugSmoothness); |
|||
} |
|||
|
|||
public void UpdateCommonSettings() |
|||
{ |
|||
var commonSettings = commonSettingsToUse; |
|||
|
|||
m_ShadowSettings.directionalLightCascadeCount = commonSettings.shadowCascadeCount; |
|||
m_ShadowSettings.directionalLightCascades = new Vector3(commonSettings.shadowCascadeSplit0, commonSettings.shadowCascadeSplit1, commonSettings.shadowCascadeSplit2); |
|||
m_ShadowSettings.maxShadowDistance = commonSettings.shadowMaxDistance; |
|||
m_ShadowSettings.directionalLightNearPlaneOffset = commonSettings.shadowNearPlaneOffset; |
|||
} |
|||
|
|||
public void OnValidate() |
|||
{ |
|||
debugDisplaySettings.OnValidate(); |
|||
sssSettings.OnValidate(); |
|||
} |
|||
|
|||
void OnEnable() |
|||
{ |
|||
debugDisplaySettings.RegisterDebug(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0cf1dab834d4ec34195b920ea7bbf9ec |
|||
timeCreated: 1496139874 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 2059a21bd962b3b4296d74ce1a6f7b9b |
|||
folderAsset: yes |
|||
timeCreated: 1496132665 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
7
Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitBakedEmission/LightingData.asset
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: b659eb7d7f70e4d4eb5211330bbf8d9c |
|||
timeCreated: 1496157534 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 25800000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes/Shaders/LDPipe_LitBakedEmission/Lightmap-0_comp_light.exr
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: c02213447cf3f8645aeb781608966311 |
|||
timeCreated: 1496157534 |
|||
licenseType: Pro |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
serializedVersion: 4 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 1 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: 1 |
|||
aniso: 3 |
|||
mipBias: 0 |
|||
wrapU: 1 |
|||
wrapV: 1 |
|||
wrapW: 1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spritePixelsToUnits: 100 |
|||
alphaUsage: 0 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 6 |
|||
textureShape: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
spritePackingTag: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: b7b2843778281fb4bbd2a62a3e165c15 |
|||
timeCreated: 1495456996 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 6e7cea1e2f04a344db1d12f0f1c98f3e |
|||
timeCreated: 1495456996 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: dd5284e29e625f044be91737547ae28d |
|||
timeCreated: 1495456996 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 7b805c6a0dad19144b48c3fe01b2775d |
|||
timeCreated: 1495456996 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: cdfed9a25a787094cbad07cb325b88e0 |
|||
timeCreated: 1495456996 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
public class DebugItemStateBool : DebugItemState<bool> |
|||
{ |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
public class DebugItemStateColor : DebugItemState<Color> |
|||
{ |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
public class DebugItemStateFloat : DebugItemState<float> |
|||
{ |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
public class DebugItemStateInt : DebugItemState<int> |
|||
{ |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
public class DebugItemStateUInt : DebugItemState<uint> |
|||
{ |
|||
} |
|||
} |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!114 &11400000 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 0} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: bc357c46587fc9d4cb8f311794d7d2f3, type: 3} |
|||
m_Name: DefaultCommonSettings |
|||
m_EditorClassIdentifier: |
|||
m_Settings: |
|||
m_ShadowMaxDistance: 1000 |
|||
m_ShadowCascadeCount: 4 |
|||
m_ShadowCascadeSplit0: 0.05 |
|||
m_ShadowCascadeSplit1: 0.2 |
|||
m_ShadowCascadeSplit2: 0.3 |
|||
m_ShadowNearPlaneOffset: 5 |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!114 &11400000 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 0} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 8b6f86e1523e69a4282e92d393be89a4, type: 3} |
|||
m_Name: HDRenderPipelineResources |
|||
m_EditorClassIdentifier: |
|||
debugDisplayLatlongShader: {fileID: 4800000, guid: c1d1d149a043a5349ba367da6c2051ba, |
|||
type: 3} |
|||
debugDisplayShadowMapShader: {fileID: 4800000, guid: ee25e539f5594f44085e0a9000c15d9b, |
|||
type: 3} |
|||
debugViewMaterialGBufferShader: {fileID: 4800000, guid: 439949ea1bfa91b4ba0d04269fcde33d, |
|||
type: 3} |
|||
debugViewTilesShader: {fileID: 4800000, guid: c7c2bd17b06ceb4468e14081aaf1b96f, |
|||
type: 3} |
|||
deferredShader: {fileID: 4800000, guid: 00dd221e34a6ab349a1196b0f2fab693, type: 3} |
|||
clearDispatchIndirectShader: {fileID: 7200000, guid: fc1f553acb80a6446a32d33e403d0656, |
|||
type: 3} |
|||
buildScreenAABBShader: {fileID: 7200000, guid: 728dce960f8a9c44bbc3abb3b851d8f6, |
|||
type: 3} |
|||
buildPerTileLightListShader: {fileID: 7200000, guid: 65af3444cbf4b3747a4dead7ee00cfee, |
|||
type: 3} |
|||
buildPerBigTileLightListShader: {fileID: 7200000, guid: 5ee1f9d6e09abe045b2f5e0b784b9072, |
|||
type: 3} |
|||
buildPerVoxelLightListShader: {fileID: 7200000, guid: 0bb1b7e0ddcd5c44baf3ddc7456eb196, |
|||
type: 3} |
|||
shadeOpaqueShader: {fileID: 7200000, guid: 0b64f79746d2daf4198eaf6eab9af259, type: 3} |
|||
drawGaussianProfileShader: {fileID: 4800000, guid: 2e8a76823cb2af944b4b45169f2649f9, |
|||
type: 3} |
|||
drawTransmittanceGraphShader: {fileID: 4800000, guid: 4517edda0467bb14489d5eccc9973ba2, |
|||
type: 3} |
|||
blitCubemap: {fileID: 4800000, guid: d05913e251bed7a4992c921c62e1b647, type: 3} |
|||
buildProbabilityTables: {fileID: 7200000, guid: b9f26cf340afe9145a699753531b2a4c, |
|||
type: 3} |
|||
computeGgxIblSampleData: {fileID: 7200000, guid: 764a24bb47ef5ba4781d9ae82ca07445, |
|||
type: 3} |
|||
GGXConvolve: {fileID: 4800000, guid: 123ed592ad5c2494b8aed301fd609e7b, type: 3} |
|||
skyboxCubemap: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} |
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue