浏览代码
Merge branch 'batch_rendering' of https://github.com/Unity-Technologies/ScriptableRenderLoop into batch_rendering
Merge branch 'batch_rendering' of https://github.com/Unity-Technologies/ScriptableRenderLoop into batch_rendering
# Conflicts: # Assets/BasicRenderBatching/LightingBatchingProbe.unity/batch_rendering
Arnaud Carre
8 年前
当前提交
89d05b25
共有 362 个文件被更改,包括 5852 次插入 和 3378 次删除
-
4Assets/BasicRenderBatching/BasicRenderBatching.cs
-
4Assets/BasicRenderBatching/LightingBatchingProbe.meta
-
8Assets/BasicRenderLoopTutorial/BasicRenderLoop.cs
-
2Assets/ScriptableRenderLoop/AdditionalLightData.cs
-
4Assets/ScriptableRenderLoop/HDRenderPipeline/Debug/Resources/DebugViewMaterialGBuffer.shader
-
4Assets/ScriptableRenderLoop/HDRenderPipeline/Debug/Resources/DebugViewTiles.shader
-
316Assets/ScriptableRenderLoop/HDRenderPipeline/Editor/HDRenderPipelineInspector.cs
-
20Assets/ScriptableRenderLoop/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs
-
33Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderPipeline.asset
-
3Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderPipeline.asset.meta
-
886Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderPipeline.cs
-
7Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/LightLoop.cs
-
80Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/Resources/Deferred.shader
-
4Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/ClusteredUtils.hlsl
-
2Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/LightingConvexHullUtils.hlsl
-
6Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/Resources/lightlistbuild-bigtile.compute
-
12Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/Resources/lightlistbuild-clustered.compute
-
4Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/Resources/lightlistbuild.compute
-
28Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/Resources/shadeopaque.compute
-
310Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/TilePass.cs
-
17Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/TilePass.hlsl
-
20Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/TilePassLoop.hlsl
-
199Assets/ScriptableRenderLoop/HDRenderPipeline/Material/LayeredLit/Editor/LayeredLitUI.cs
-
103Assets/ScriptableRenderLoop/HDRenderPipeline/Material/LayeredLit/LayeredLit.shader
-
110Assets/ScriptableRenderLoop/HDRenderPipeline/Material/LayeredLit/LayeredLitTessellation.shader
-
73Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs
-
103Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Editor/LitUI.cs
-
12Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Lit.cs
-
16Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Lit.cs.hlsl
-
55Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Lit.hlsl
-
109Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Lit.shader
-
708Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/LitData.hlsl
-
177Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/LitDataInternal.hlsl
-
61Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/LitProperties.hlsl
-
20Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/LitTessellation.hlsl
-
124Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/LitTessellation.shader
-
2Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Resources/PreIntegratedFGD.shader
-
8Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/ShaderPass/LitMetaPass.hlsl
-
25Assets/ScriptableRenderLoop/HDRenderPipeline/Material/SampleLayer.hlsl
-
56Assets/ScriptableRenderLoop/HDRenderPipeline/Material/SampleLayerInternal.hlsl
-
286Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Unlit/Editor/BaseUnlitUI.cs
-
89Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Unlit/Unlit.shader
-
202Assets/ScriptableRenderLoop/HDRenderPipeline/PostProcess/Editor/PostProcessingEditor.cs
-
446Assets/ScriptableRenderLoop/HDRenderPipeline/PostProcess/PostProcessing.cs
-
114Assets/ScriptableRenderLoop/HDRenderPipeline/PostProcess/Resources/FinalPass.shader
-
134Assets/ScriptableRenderLoop/HDRenderPipeline/SceneSettings/CommonSettings.cs
-
5Assets/ScriptableRenderLoop/HDRenderPipeline/SceneSettings/Editor/CommonSettingsEditor.cs
-
12Assets/ScriptableRenderLoop/HDRenderPipeline/ShaderPass/ShaderPassForward.hlsl
-
4Assets/ScriptableRenderLoop/HDRenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl
-
20Assets/ScriptableRenderLoop/HDRenderPipeline/ShaderPass/TessellationShare.hlsl
-
67Assets/ScriptableRenderLoop/HDRenderPipeline/ShaderVariables.hlsl
-
10Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/HDRISky/HDRISkyParameters.cs
-
37Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/HDRISky/HDRISkyRenderer.cs
-
2Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/HDRISky/Resources/SkyHDRI.shader
-
9Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/ProceduralSky/ProceduralSkyParameters.cs
-
35Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/ProceduralSky/ProceduralSkyRenderer.cs
-
2Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/ProceduralSky/Resources/AtmosphericScattering.hlsl
-
2Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/ProceduralSky/Resources/SkyProcedural.shader
-
2Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/Resources/GGXConvolve.shader
-
162Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/SkyManager.cs
-
35Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/SkyParameters.cs
-
35Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/SkyRenderer.cs
-
129Assets/ScriptableRenderLoop/HDRenderPipeline/Utilities.cs
-
30Assets/ScriptableRenderLoop/RenderPasses/ShadowRenderPass.cs
-
2Assets/ScriptableRenderLoop/ShaderLibrary/API/D3D11.hlsl
-
2Assets/ScriptableRenderLoop/ShaderLibrary/API/Metal.hlsl
-
2Assets/ScriptableRenderLoop/ShaderLibrary/API/PSSL.hlsl
-
41Assets/ScriptableRenderLoop/ShaderLibrary/Common.hlsl
-
13Assets/ScriptableRenderLoop/ShaderLibrary/CommonLighting.hlsl
-
6Assets/ScriptableRenderLoop/ShaderLibrary/Hammersley.hlsl
-
72Assets/ScriptableRenderLoop/ShaderLibrary/ImageBasedLighting.hlsl
-
83Assets/ScriptableRenderLoop/ShaderLibrary/Sampling.hlsl
-
4Assets/ScriptableRenderLoop/core/RenderPipeline.cs
-
7Assets/ScriptableRenderLoop/fptl/FptlLighting.cs
-
2Assets/ScriptableRenderLoop/fptl/LightingConvexHullUtils.hlsl
-
6Assets/ScriptableRenderLoop/fptl/TiledLightingUtils.hlsl
-
2Assets/ScriptableRenderLoop/fptl/lightlistbuild-bigtile.compute
-
10Assets/ScriptableRenderLoop/fptl/lightlistbuild-clustered.compute
-
4Assets/ScriptableRenderLoop/fptl/lightlistbuild.compute
-
596Assets/TestScenes/HDTest/GlobalIlluminationTest.unity
-
998Assets/TestScenes/HDTest/GlobalIlluminationTest/LightingData.asset
-
3Assets/TestScenes/HDTest/GlobalIlluminationTest/LightingData.asset.meta
-
17Assets/TestScenes/HDTest/GraphicTest/LayeredTessellation/Layer-2-woord-rock.mat
-
4Assets/TestScenes/HDTest/GraphicTest/Two Sided/Prefabs/Materials.meta
-
453Assets/TestScenes/HDTest/HDRenderLoopTest.unity
-
920Assets/TestScenes/HDTest/LayeredLitTest.unity
-
64Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_BlendMask.mat
-
1Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_BlendMask.mat.meta
-
53Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_HeightBased.mat
-
1Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_HeightBased.mat.meta
-
49Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_Layer0_Planar.mat
-
1Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_Layer0_Planar.mat.meta
-
53Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_Layer0_Triplanar.mat
-
1Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_Layer0_Triplanar.mat.meta
-
49Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_Layer0_UV0.mat
-
1Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_Layer0_UV0.mat.meta
-
53Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_Layer0_UV1.mat
-
1Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_Layer0_UV1.mat.meta
-
51Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_Layer0_UV2.mat
-
1Assets/TestScenes/HDTest/LayeredLitTest/Material/Layered_Layer0_UV2.mat.meta
|
|||
fileFormatVersion: 2 |
|||
guid: a5c2c272d61530b4993efc1adf4ed4ce |
|||
guid: 67666663c1084474ca9c8eab60021c7e |
|||
timeCreated: 1486051479 |
|||
timeCreated: 1486055504 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|
|||
fileFormatVersion: 2 |
|||
guid: e185fecca3c73cd47a09f1092663ef32 |
|||
timeCreated: 1484329328 |
|||
timeCreated: 1485874614 |
|||
mainObjectFileID: 11400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
886
Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderPipeline.cs
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using System.Linq; |
|||
using System.Reflection; |
|||
[ExecuteInEditMode] |
|||
[DisallowMultipleComponent] |
|||
public class CommonSettings |
|||
: MonoBehaviour |
|||
public class CommonSettings : ScriptableObject |
|||
[SerializeField] private string m_SkyRendererTypeName = ""; // Serialize a string because serialize a Type.
|
|||
|
|||
[SerializeField] float m_ShadowMaxDistance = ShadowSettings.Default.maxShadowDistance; |
|||
[SerializeField] int m_ShadowCascadeCount = ShadowSettings.Default.directionalLightCascadeCount; |
|||
[SerializeField] float m_ShadowCascadeSplit0 = ShadowSettings.Default.directionalLightCascades.x; |
|||
[SerializeField] float m_ShadowCascadeSplit1 = ShadowSettings.Default.directionalLightCascades.y; |
|||
[SerializeField] float m_ShadowCascadeSplit2 = ShadowSettings.Default.directionalLightCascades.z; |
|||
|
|||
public Type skyRendererType |
|||
[Serializable] |
|||
public struct Settings |
|||
set { m_SkyRendererTypeName = value != null ? value.FullName : ""; OnSkyRendererChanged(); } |
|||
get { return m_SkyRendererTypeName == "" ? null : Assembly.GetAssembly(typeof(CommonSettings)).GetType(m_SkyRendererTypeName); } |
|||
} |
|||
// Shadows
|
|||
[SerializeField] |
|||
float m_ShadowMaxDistance; |
|||
[SerializeField] |
|||
int m_ShadowCascadeCount; |
|||
[SerializeField] |
|||
float m_ShadowCascadeSplit0; |
|||
[SerializeField] |
|||
float m_ShadowCascadeSplit1; |
|||
[SerializeField] |
|||
float m_ShadowCascadeSplit2; |
|||
public float shadowMaxDistance { set { m_ShadowMaxDistance = value; OnValidate(); } get { return m_ShadowMaxDistance; } } |
|||
public int shadowCascadeCount { set { m_ShadowCascadeCount = value; OnValidate(); } get { return m_ShadowCascadeCount; } } |
|||
public float shadowCascadeSplit0 { set { m_ShadowCascadeSplit0 = value; OnValidate(); } get { return m_ShadowCascadeSplit0; } } |
|||
public float shadowCascadeSplit1 { set { m_ShadowCascadeSplit1 = value; OnValidate(); } get { return m_ShadowCascadeSplit1; } } |
|||
public float shadowCascadeSplit2 { set { m_ShadowCascadeSplit2 = value; OnValidate(); } get { return m_ShadowCascadeSplit2; } } |
|||
public float shadowMaxDistance { set { m_ShadowMaxDistance = value; OnValidate(); } get { return m_ShadowMaxDistance; } } |
|||
public int shadowCascadeCount { set { m_ShadowCascadeCount = value; OnValidate(); } get { return m_ShadowCascadeCount; } } |
|||
public float shadowCascadeSplit0 { set { m_ShadowCascadeSplit0 = value; OnValidate(); } get { return m_ShadowCascadeSplit0; } } |
|||
public float shadowCascadeSplit1 { set { m_ShadowCascadeSplit1 = value; OnValidate(); } get { return m_ShadowCascadeSplit1; } } |
|||
public float shadowCascadeSplit2 { set { m_ShadowCascadeSplit2 = value; OnValidate(); } get { return m_ShadowCascadeSplit2; } } |
|||
void OnEnable() |
|||
{ |
|||
HDRenderPipeline renderPipeline = Utilities.GetHDRenderPipeline(); |
|||
if (renderPipeline == null) |
|||
void OnValidate() |
|||
return; |
|||
m_ShadowMaxDistance = Mathf.Max(0.0f, m_ShadowMaxDistance); |
|||
m_ShadowCascadeCount = Math.Min(4, Math.Max(1, m_ShadowCascadeCount)); |
|||
m_ShadowCascadeSplit0 = Mathf.Clamp01(m_ShadowCascadeSplit0); |
|||
m_ShadowCascadeSplit1 = Mathf.Clamp01(m_ShadowCascadeSplit1); |
|||
m_ShadowCascadeSplit2 = Mathf.Clamp01(m_ShadowCascadeSplit2); |
|||
if (renderPipeline.commonSettings == null) |
|||
renderPipeline.commonSettings = this; |
|||
else if (renderPipeline.commonSettings != this) |
|||
Debug.LogWarning("Only one CommonSettings can be setup at a time."); |
|||
|
|||
OnSkyRendererChanged(); |
|||
} |
|||
|
|||
void OnDisable() |
|||
{ |
|||
HDRenderPipeline renderPipeline = Utilities.GetHDRenderPipeline(); |
|||
if (renderPipeline == null) |
|||
public static readonly Settings s_Defaultsettings = new Settings |
|||
return; |
|||
} |
|||
|
|||
if (renderPipeline.commonSettings == this) |
|||
renderPipeline.commonSettings = null; |
|||
m_ShadowMaxDistance = ShadowSettings.Default.maxShadowDistance, |
|||
m_ShadowCascadeCount = ShadowSettings.Default.directionalLightCascadeCount, |
|||
m_ShadowCascadeSplit0 = ShadowSettings.Default.directionalLightCascades.x, |
|||
m_ShadowCascadeSplit1 = ShadowSettings.Default.directionalLightCascades.y, |
|||
m_ShadowCascadeSplit2 = ShadowSettings.Default.directionalLightCascades.z, |
|||
}; |
|||
void OnValidate() |
|||
{ |
|||
m_ShadowMaxDistance = Mathf.Max(0.0f, m_ShadowMaxDistance); |
|||
m_ShadowCascadeCount = Math.Min(4, Math.Max(1, m_ShadowCascadeCount)); |
|||
m_ShadowCascadeSplit0 = Mathf.Min(1.0f, Mathf.Max(0.0f, m_ShadowCascadeSplit0)); |
|||
m_ShadowCascadeSplit1 = Mathf.Min(1.0f, Mathf.Max(0.0f, m_ShadowCascadeSplit1)); |
|||
m_ShadowCascadeSplit2 = Mathf.Min(1.0f, Mathf.Max(0.0f, m_ShadowCascadeSplit2)); |
|||
[SerializeField] |
|||
private Settings m_Settings = Settings.s_Defaultsettings; |
|||
OnSkyRendererChanged(); |
|||
} |
|||
|
|||
void OnSkyRendererChanged() |
|||
public Settings settings |
|||
HDRenderPipeline renderPipeline = Utilities.GetHDRenderPipeline(); |
|||
if (renderPipeline == null) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
renderPipeline.InstantiateSkyRenderer(skyRendererType); |
|||
|
|||
List<SkyParameters> result = new List<SkyParameters>(); |
|||
gameObject.GetComponents<SkyParameters>(result); |
|||
|
|||
Type skyParamType = renderPipeline.skyManager.GetSkyParameterType(); |
|||
|
|||
// Disable all incompatible sky parameters and enable the compatible one
|
|||
bool found = false; |
|||
foreach (SkyParameters param in result) |
|||
{ |
|||
if (param.GetType() == skyParamType) |
|||
{ |
|||
// This is a workaround the fact that we can't control the order in which components are initialized.
|
|||
// So it can happen that a given SkyParameter is OnEnabled before the CommonSettings and so fail the setup because the SkyRenderer is not yet initialized.
|
|||
// So we disable it to for OnEnable to be called again.
|
|||
param.enabled = false; |
|||
|
|||
param.enabled = true; |
|||
found = true; |
|||
} |
|||
else |
|||
{ |
|||
param.enabled = false; |
|||
} |
|||
} |
|||
|
|||
// If it does not exist, create the parameters
|
|||
if (!found && skyParamType != null) |
|||
{ |
|||
gameObject.AddComponent(skyParamType); |
|||
} |
|||
get { return m_Settings; } |
|||
set { m_Settings = value; } |
|||
} |
|||
} |
|||
} |
998
Assets/TestScenes/HDTest/GlobalIlluminationTest/LightingData.asset
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 3d51fc2c60f333c44b613049001dfba8 |
|||
timeCreated: 1484352329 |
|||
timeCreated: 1485441498 |
|||
mainObjectFileID: 25800000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 2a83abe1ea0fe2648947e4741977d7fd |
|||
guid: 0e2aa881811d0644896d4b5a732945cc |
|||
timeCreated: 1485444498 |
|||
timeCreated: 1485804900 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
920
Assets/TestScenes/HDTest/LayeredLitTest.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue