浏览代码

Merge branch 'master' of https://github.com/Unity-Technologies/ScriptableRenderLoop into Branch_SkyLightingOverride

/feature-ReflectionProbeFit
Julien Ignace 7 年前
当前提交
713d15c0
共有 180 个文件被更改,包括 240 次插入211 次删除
  1. 30
      ScriptableRenderPipeline/LightweightPipeline/Data/LightweightPipelineAsset.cs
  2. 28
      ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetEditor.cs
  3. 33
      ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs
  4. 4
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShaderLibrary/Core.hlsl
  5. 4
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShaderLibrary/InputSurface.hlsl
  6. 9
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShaderLibrary/Lighting.hlsl
  7. 2
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShaderLibrary/Particles.hlsl
  8. 2
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShaderLibrary/Shadows.hlsl
  9. 12
      TestbedPipelines/Fptl/LightingTemplate.hlsl
  10. 2
      TestbedPipelines/Fptl/ShadowContext.hlsl
  11. 12
      TestbedPipelines/OnTileDeferredPipeline/Shaders/LightingTemplate.hlsl
  12. 7
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset
  13. 2
      ScriptableRenderPipeline/Core/CoreRP/Shadow/Resources/DebugDisplayShadowMap.shader
  14. 16
      ScriptableRenderPipeline/Core/CoreRP/Volume/VolumeParameter.cs
  15. 8
      ScriptableRenderPipeline/Core/CoreRP/Volume/VolumeComponent.cs
  16. 6
      ScriptableRenderPipeline/Core/CoreRP/Resources/EncodeBC6H.compute
  17. 2
      ScriptableRenderPipeline/Core/CoreRP/Resources/BlitCubeTextureFace.shader
  18. 2
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Shadow/Shadow.hlsl
  19. 24
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Packing.hlsl
  20. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/BlitCubemap.shader
  21. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/OpaqueAtmosphericScattering.shader
  22. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/AtmosphericScattering/AtmosphericScattering.hlsl
  23. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/HDRISky/Resources/SkyHDRI.shader
  24. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/ProceduralSky/Resources/ProceduralSky.shader
  25. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/SceneSettings/Resources/DrawTransmittanceGraph.shader
  26. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/SceneSettings/Resources/DrawSssProfile.shader
  27. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewTiles.shader
  28. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewMaterialGBuffer.shader
  29. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugFullScreen.shader
  30. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplayLatlong.shader
  31. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDEditorUtils.cs
  32. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
  33. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Lighting.hlsl
  34. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/scrbound.compute
  35. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/materialflags.compute
  36. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild.compute
  37. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild-clustered.compute
  38. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild-bigtile.compute
  39. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/builddispatchindirect.compute
  40. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/ShadowContext.hlsl
  41. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/Deferred.compute
  42. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/DeferredDirectionalShadow.compute
  43. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Deferred.shader
  44. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Unlit/Unlit.shader
  45. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.shader
  46. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl
  47. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.compute
  48. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SSSProfile.meta
  49. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/CombineLighting.shader
  50. 16
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Material.hlsl
  51. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Resources/PreIntegratedFGD.shader
  52. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitTessellation.shader
  53. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitDataDisplacement.hlsl
  54. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitData.hlsl
  55. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.shader
  56. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl
  57. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLitTessellation.shader
  58. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLitDataDisplacement.hlsl
  59. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLit.shader
  60. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/GGXConvolve.shader
  61. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/ComputeGgxIblSampleData.compute
  62. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/BuildProbabilityTables.compute
  63. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Decal/DecalData.hlsl
  64. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Decal/Decal.shader
  65. 52
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DepthDownsample.compute
  66. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/CopyStencilBuffer.shader
  67. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/CameraMotionVectors.shader
  68. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/ApplyDistorsion.compute
  69. 8
      ScriptableRenderPipeline/Core/CoreRP.meta
  70. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP.meta
  71. 0
      /ScriptableRenderPipeline/Core/CoreRP/Resources.meta
  72. 0
      /ScriptableRenderPipeline/Core/CoreRP/TextureSettings.cs.meta
  73. 0
      /ScriptableRenderPipeline/Core/CoreRP/TextureCache.cs.meta
  74. 0
      /ScriptableRenderPipeline/Core/CoreRP/Shadow.meta
  75. 0
      /ScriptableRenderPipeline/Core/CoreRP/Debugging.meta
  76. 0
      /ScriptableRenderPipeline/Core/CoreRP/Camera.meta
  77. 0
      /ScriptableRenderPipeline/Core/CoreRP/Singleton.cs.meta
  78. 0
      /ScriptableRenderPipeline/Core/CoreRP/Singleton.cs
  79. 0
      /ScriptableRenderPipeline/Core/CoreRP/Camera
  80. 0
      /ScriptableRenderPipeline/Core/CoreRP/TextureSettings.cs
  81. 0
      /ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary.meta
  82. 0
      /ScriptableRenderPipeline/Core/CoreRP/ShaderGenerator
  83. 0
      /ScriptableRenderPipeline/Core/CoreRP/ShaderGenerator.meta
  84. 0
      /ScriptableRenderPipeline/Core/CoreRP/Editor.meta
  85. 0
      /ScriptableRenderPipeline/Core/CoreRP/SceneRenderPipeline.cs
  86. 0
      /ScriptableRenderPipeline/Core/CoreRP/SceneRenderPipeline.cs.meta
  87. 0
      /ScriptableRenderPipeline/Core/CoreRP/CommandBufferPool.cs.meta
  88. 0
      /ScriptableRenderPipeline/Core/CoreRP/Inputs.meta
  89. 0
      /ScriptableRenderPipeline/Core/CoreRP/Inputs
  90. 0
      /ScriptableRenderPipeline/Core/CoreRP/TextureCache.cs
  91. 0
      /ScriptableRenderPipeline/Core/CoreRP/CoreUtils.cs.meta
  92. 0
      /ScriptableRenderPipeline/Core/CoreRP/ProfilingSample.cs.meta
  93. 0
      /ScriptableRenderPipeline/Core/CoreRP/ProfilingSample.cs
  94. 0
      /ScriptableRenderPipeline/Core/CoreRP/CommandBufferPool.cs
  95. 0
      /ScriptableRenderPipeline/Core/CoreRP/Shadow
  96. 0
      /ScriptableRenderPipeline/Core/CoreRP/CoreUtils.cs
  97. 0
      /ScriptableRenderPipeline/Core/CoreRP/EncodeBC6H.cs

30
ScriptableRenderPipeline/LightweightPipeline/Data/LightweightPipelineAsset.cs


[SerializeField] private Shader m_DefaultShader;
[SerializeField] private Shader m_BlitShader;
[SerializeField] private Shader m_CopyDepthShader;
[SerializeField] private LightweightPipelineResource m_ResourceAsset;
[SerializeField] private Material m_DefaultMaterial;
[SerializeField] private Material m_DefaultParticleMaterial;
[SerializeField] private Material m_DefaultTerrainMaterial;
[MenuItem("Assets/Create/Render Pipeline/Lightweight/Pipeline Asset", priority = CoreUtils.assetCreateMenuPriority1)]
static void CreateLightweightPipeline()

resourceAsset = AssetDatabase.LoadAssetAtPath<LightweightPipelineResource>(path);
}
if (resourceAsset != null)
{
instance.m_DefaultMaterial = resourceAsset.DefaultMaterial;
instance.m_DefaultParticleMaterial = resourceAsset.DefaultParticleMaterial;
instance.m_DefaultTerrainMaterial = resourceAsset.DefaultTerrainMaterial;
}
instance.m_ResourceAsset = resourceAsset;
instance.m_DefaultShader = Shader.Find(LightweightShaderUtils.GetShaderPath(ShaderPathID.STANDARD_PBS));
instance.m_BlitShader = Shader.Find(LightweightShaderUtils.GetShaderPath(ShaderPathID.HIDDEN_BLIT));
instance.m_CopyDepthShader = Shader.Find(LightweightShaderUtils.GetShaderPath(ShaderPathID.HIDDEN_DEPTH_COPY));

public override Material GetDefaultMaterial()
{
#if UNITY_EDITOR
return m_DefaultMaterial;
#else
if (m_ResourceAsset != null)
return m_ResourceAsset.DefaultMaterial;
#endif
#endif
return m_DefaultParticleMaterial;
#else
return null;
if (m_ResourceAsset != null)
return m_ResourceAsset.DefaultParticleMaterial;
return null;
}
public override Material GetDefaultLineMaterial()

public override Material GetDefaultTerrainMaterial()
{
#if UNITY_EDITOR
return m_DefaultTerrainMaterial;
#else
return null;
if (m_ResourceAsset != null)
return m_ResourceAsset.DefaultTerrainMaterial;
return null;
}
public override Material GetDefaultUIMaterial()

28
ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetEditor.cs


{
public static GUIContent renderingLabel = new GUIContent("Rendering");
public static GUIContent shadowLabel = new GUIContent("Shadows");
public static GUIContent defaults = new GUIContent("Default Materials");
public static GUIContent renderScaleLabel = new GUIContent("Render Scale", "Scales the camera render target allowing the game to render at a resolution different than native resolution. UI is always rendered at native resolution. When in VR mode, VR scaling configuration is used instead.");

public static GUIContent shadowCascadeSplit = new GUIContent("Cascades Split",
"Percentages to split shadow volume");
public static GUIContent defaultMaterial = new GUIContent("Mesh",
"Material to use when creating 3D objects");
public static GUIContent defaultParticleMaterial = new GUIContent("Particles",
"Material to use when creating Particle Systems");
public static GUIContent defaultTerrainMaterial = new GUIContent("Terrain",
"Material to use in Terrains");
public static GUIContent msaaContent = new GUIContent("Anti Aliasing (MSAA)", "Controls the global anti aliasing settings.");
public static string[] shadowTypeOptions = {"No Shadows", "Hard Shadows", "Hard and Soft Shadows"};

private SerializedProperty m_ShadowCascadesProp;
private SerializedProperty m_ShadowCascade2SplitProp;
private SerializedProperty m_ShadowCascade4SplitProp;
private SerializedProperty m_DefaultMaterial;
private SerializedProperty m_DefaultParticleMaterial;
private SerializedProperty m_DefaultTerrainMaterial;
private SerializedProperty m_MSAA;
void OnEnable()

m_ShadowCascadesProp = serializedObject.FindProperty("m_ShadowCascades");
m_ShadowCascade2SplitProp = serializedObject.FindProperty("m_Cascade2Split");
m_ShadowCascade4SplitProp = serializedObject.FindProperty("m_Cascade4Split");
m_DefaultMaterial = serializedObject.FindProperty("m_DefaultMaterial");
m_DefaultParticleMaterial = serializedObject.FindProperty("m_DefaultParticleMaterial");
m_DefaultTerrainMaterial = serializedObject.FindProperty("m_DefaultTerrainMaterial");
m_MSAA = serializedObject.FindProperty("m_MSAA");
}

EditorGUI.BeginChangeCheck();
if (mode >= options.Length)
Debug.LogError(string.Format("Invalid option while trying to set {0}", label.text));
mode = EditorGUILayout.Popup(label, mode, options);
if (EditorGUI.EndChangeCheck())
{

EditorGUILayout.PropertyField(m_ShadowCascade2SplitProp, Styles.shadowCascadeSplit);
}
EditorGUI.indentLevel--;
EditorGUILayout.Space();
EditorGUILayout.LabelField(Styles.defaults, EditorStyles.boldLabel);
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_DefaultMaterial, Styles.defaultMaterial);
EditorGUILayout.PropertyField(m_DefaultParticleMaterial, Styles.defaultParticleMaterial);
EditorGUILayout.PropertyField(m_DefaultTerrainMaterial, Styles.defaultTerrainMaterial);
EditorGUI.indentLevel--;
serializedObject.ApplyModifiedProperties();

33
ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs


using System;
using System.Collections.Generic;
using System.Diagnostics;
using UnityEngine.Experimental.GlobalIllumination;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.XR;

m_Asset = asset;
BuildShadowSettings();
SetRenderingFeatures();
PerFrameBuffer._GlossyEnvironmentColor = Shader.PropertyToID("_GlossyEnvironmentColor");
PerFrameBuffer._SubtractiveShadowColor = Shader.PropertyToID("_SubtractiveShadowColor");

CoreUtils.Destroy(m_BlitMaterial);
}
private void SetRenderingFeatures()
{
#if UNITY_EDITOR
SupportedRenderingFeatures.active = new SupportedRenderingFeatures()
{
reflectionProbeSupportFlags = SupportedRenderingFeatures.ReflectionProbeSupportFlags.None,
defaultMixedLightingMode = SupportedRenderingFeatures.LightmapMixedBakeMode.Subtractive,
supportedMixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeMode.Subtractive,
supportedLightmapBakeTypes = LightmapBakeType.Baked | LightmapBakeType.Mixed,
supportedLightmapsModes = LightmapsMode.CombinedDirectional | LightmapsMode.NonDirectional,
rendererSupportsLightProbeProxyVolumes = false,
rendererSupportsMotionVectors = false,
rendererSupportsReceiveShadows = true,
rendererSupportsReflectionProbes = true
};
#endif
}
// TODO: This is at the moment required for all pipes. We should not implicitly change user project settings
// instead this should be forced when using SRP, since all SRP use linear lighting.
SetupPerFrameShaderConstants();
// Sort cameras array by camera depth

// invAngleRange = 1.0 / (cosInnerAngle - cosOuterAngle)
// SdotL * invAngleRange + (-cosOuterAngle * invAngleRange)
// If we precompute the terms in a MAD instruction
float spotAngle = Mathf.Deg2Rad * lightData.spotAngle;
float cosOuterAngle = Mathf.Cos(spotAngle * 0.5f);
float cosInneAngle = Mathf.Cos(spotAngle * 0.25f);
float smoothAngleRange = cosInneAngle - cosOuterAngle;
if (Mathf.Approximately(smoothAngleRange, 0.0f))
smoothAngleRange = 1.0f;
float cosOuterAngle = Mathf.Cos(Mathf.Deg2Rad * lightData.spotAngle * 0.5f);
float cosInneAngle = Mathf.Cos(LightmapperUtils.ExtractInnerCone(lightData.light) * 0.5f);
float smoothAngleRange = Mathf.Max(0.001f, cosInneAngle - cosOuterAngle);
float invAngleRange = 1.0f / smoothAngleRange;
float add = -cosOuterAngle * invAngleRange;
lightSpotAttenuation = new Vector4(invAngleRange, add, 0.0f);

4
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShaderLibrary/Core.hlsl


#ifndef LIGHTWEIGHT_PIPELINE_CORE_INCLUDED
#define LIGHTWEIGHT_PIPELINE_CORE_INCLUDED
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/Packing.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Packing.hlsl"
#include "Input.hlsl"
#ifdef _NORMALMAP

4
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShaderLibrary/InputSurface.hlsl


#define LIGHTWEIGHT_SURFACE_INPUT_INCLUDED
#include "Core.hlsl"
#include "ShaderLibrary/Packing.hlsl"
#include "ShaderLibrary/CommonMaterial.hlsl"
#include "CoreRP/ShaderLibrary/Packing.hlsl"
#include "CoreRP/ShaderLibrary/CommonMaterial.hlsl"
#ifdef _SPECULAR_SETUP
#define SAMPLE_METALLICSPECULAR(uv) SAMPLE_TEXTURE2D(_SpecGlossMap, sampler_SpecGlossMap, uv)

9
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShaderLibrary/Lighting.hlsl


#ifndef LIGHTWEIGHT_LIGHTING_INCLUDED
#define LIGHTWEIGHT_LIGHTING_INCLUDED
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/EntityLighting.hlsl"
#include "ShaderLibrary/ImageBasedLighting.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/EntityLighting.hlsl"
#include "CoreRP/ShaderLibrary/ImageBasedLighting.hlsl"
#include "Core.hlsl"
#include "Shadows.hlsl"

// If we precompute the terms in a MAD instruction
half SdotL = dot(spotDirection, lightDirection);
return saturate(SdotL * spotAttenuation.x + spotAttenuation.y);
half atten = saturate(SdotL * spotAttenuation.x + spotAttenuation.y);
return atten * atten;
}
inline half GetLightDirectionAndRealtimeAttenuation(LightInput lightInput, half3 normal, float3 worldPos, out half3 lightDirection)

2
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShaderLibrary/Particles.hlsl


#include "Core.hlsl"
#include "InputSurface.hlsl"
#include "ShaderLibrary/Color.hlsl"
#include "CoreRP/ShaderLibrary/Color.hlsl"
#if defined (_COLORADDSUBDIFF_ON)
half4 _ColorAddSubDiff;

2
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShaderLibrary/Shadows.hlsl


#ifndef LIGHTWEIGHT_SHADOWS_INCLUDED
#define LIGHTWEIGHT_SHADOWS_INCLUDED
#include "ShaderLibrary\Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#define MAX_SHADOW_CASCADES 4

12
TestbedPipelines/Fptl/LightingTemplate.hlsl


#define CUBEMAPFACE_NEGATIVE_Z 5
#if defined(SHADER_API_D3D11)
# include "ShaderLibrary/API/D3D11.hlsl"
# include "CoreRP/ShaderLibrary/API/D3D11.hlsl"
# include "ShaderLibrary/API/PSSL.hlsl"
# include "CoreRP/ShaderLibrary/API/PSSL.hlsl"
# include "ShaderLibrary/API/D3D11.hlsl"
# include "ShaderLibrary/API/D3D11_1.hlsl"
# include "CoreRP/ShaderLibrary/API/D3D11.hlsl"
# include "CoreRP/ShaderLibrary/API/D3D11_1.hlsl"
# include "ShaderLibrary/API/Metal.hlsl"
# include "CoreRP/ShaderLibrary/API/Metal.hlsl"
#include "ShaderLibrary/API/Validate.hlsl"
#include "CoreRP/ShaderLibrary/API/Validate.hlsl"
#include "Shadow.hlsl"

2
TestbedPipelines/Fptl/ShadowContext.hlsl


#define SHADOWCONTEXT_MAX_SAMPLER 0
#define SHADOWCONTEXT_MAX_COMPSAMPLER 1
#include "ShaderLibrary/Shadow/Shadow.hlsl"
#include "CoreRP/ShaderLibrary/Shadow/Shadow.hlsl"
TEXTURE2D_ARRAY(_ShadowmapExp_PCF);
SAMPLER2D_SHADOW(sampler_ShadowmapExp_PCF);

12
TestbedPipelines/OnTileDeferredPipeline/Shaders/LightingTemplate.hlsl


#define DIRECTIONAL_LIGHT (3)
#if defined(SHADER_API_D3D11)
# include "ShaderLibrary/API/D3D11.hlsl"
# include "CoreRP/ShaderLibrary/API/D3D11.hlsl"
# include "ShaderLibrary/API/PSSL.hlsl"
# include "CoreRP/ShaderLibrary/API/PSSL.hlsl"
# include "ShaderLibrary/API/D3D11.hlsl"
# include "ShaderLibrary/API/D3D11_1.hlsl"
# include "CoreRP/ShaderLibrary/API/D3D11.hlsl"
# include "CoreRP/ShaderLibrary/API/D3D11_1.hlsl"
# include "ShaderLibrary/API/Metal.hlsl"
# include "CoreRP/ShaderLibrary/API/Metal.hlsl"
#include "ShaderLibrary/API/Validate.hlsl"
#include "CoreRP/ShaderLibrary/API/Validate.hlsl"
#include "../../Fptl/Shadow.hlsl"
UNITY_DECLARE_DEPTH_TEXTURE(_CameraGBufferZ);

7
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset


m_ShadowAtlasResolution: 2048
m_ShadowNearPlaneOffset: 2
m_ShadowDistance: 50
m_ShadowCascades: 4
m_ShadowCascades: 0
m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
m_DefaultParticleMaterial: {fileID: 2100000, guid: e823cd5b5d27c0f4b8256e7c12ee3e6d,
type: 2}
m_DefaultTerrainMaterial: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e,
type: 2}

2
ScriptableRenderPipeline/Core/CoreRP/Shadow/Resources/DebugDisplayShadowMap.shader


#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
float4 _TextureScaleBias;
float _TextureSlice;

16
ScriptableRenderPipeline/Core/CoreRP/Volume/VolumeParameter.cs


internal abstract void SetValue(VolumeParameter parameter);
// This is used in case you need to access fields/properties that can't be accessed in the
// constructor of a ScriptableObject (VolumeParameter are generally declared and inited in
// a VolumeComponent which is a ScriptableObject). This will be called right after the
// VolumeComponent object has been constructed, thus allowing access to previously
// "forbidden" fields/properties.
protected internal virtual void OnEnable()
{
}
// Called when the parent VolumeComponent OnDisabled is called
protected internal virtual void OnDisable()
{
}
public static bool IsObjectParameter(Type type)
{
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(ObjectParameter<>))

{
this.hdr = hdr;
this.showAlpha = showAlpha;
this.showEyeDropper = showEyeDropper;
this.overrideState = overrideState;
}

{
this.hdr = hdr;
this.showAlpha = showAlpha;
this.showEyeDropper = showEyeDropper;
this.overrideState = overrideState;
}
}

8
ScriptableRenderPipeline/Core/CoreRP/Volume/VolumeComponent.cs


.Select(t => (VolumeParameter)t.GetValue(this))
.ToList()
.AsReadOnly();
foreach (var parameter in parameters)
parameter.OnEnable();
if (parameters == null)
return;
foreach (var parameter in parameters)
parameter.OnDisable();
}
public void SetAllOverridesTo(bool state)

6
ScriptableRenderPipeline/Core/CoreRP/Resources/EncodeBC6H.compute


#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/BC6H.hlsl"
#include "ShaderLibrary/Sampling/Sampling.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/BC6H.hlsl"
#include "CoreRP/ShaderLibrary/Sampling/Sampling.hlsl"
TextureCube<float4> _Source;
RWTexture2DArray<uint4> _Target;

2
ScriptableRenderPipeline/Core/CoreRP/Resources/BlitCubeTextureFace.shader


Cull Off
HLSLPROGRAM
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#pragma vertex vert
#pragma fragment frag

2
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Shadow/Shadow.hlsl


#define SHADOW_OPTIMIZE_REGISTER_USAGE 0
#endif
#include "Shadow/ShadowBase.cs.hlsl" // ShadowData definition, auto generated (don't modify)
#include "CoreRP/Shadow/ShadowBase.cs.hlsl" // ShadowData definition, auto generated (don't modify)
#include "ShadowTexFetch.hlsl" // Resource sampling definitions (don't modify)
struct ShadowContext

24
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Packing.hlsl


// Ref: http://jcgt.org/published/0003/02/01/paper.pdf
// Encode with Oct, this function work with any size of output
// return float between [-1, 1]
float2 PackNormalOctEncode(float3 n)
{
//float l1norm = dot(abs(n), 1.0);
//float2 res0 = n.xy * (1.0 / l1norm);
//float2 val = 1.0 - abs(res0.yx);
//return (n.zz < float2(0.0, 0.0) ? (res0 >= 0.0 ? val : -val) : res0);
// Optimized version of above code:
n *= rcp(dot(abs(n), 1.0));
float t = saturate(-n.z);
return n.xy + (n.xy >= 0.0 ? t : -t);
float2 PackNormalOctEncode(float3 n)
{
//float l1norm = dot(abs(n), 1.0);
//float2 res0 = n.xy * (1.0 / l1norm);
//float2 val = 1.0 - abs(res0.yx);
//return (n.zz < float2(0.0, 0.0) ? (res0 >= 0.0 ? val : -val) : res0);
// Optimized version of above code:
n *= rcp(dot(abs(n), 1.0));
float t = saturate(-n.z);
return n.xy + (n.xy >= 0.0 ? t : -t);
}
float3 UnpackNormalOctEncode(float2 f)

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/BlitCubemap.shader


#pragma fragment frag
#pragma target 4.5
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
TEXTURECUBE(_MainTex);
SAMPLER(sampler_MainTex);

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/OpaqueAtmosphericScattering.shader


#pragma enable_d3d11_debug_symbols
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "../ShaderVariables.hlsl"
#include "AtmosphericScattering/AtmosphericScattering.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/AtmosphericScattering/AtmosphericScattering.hlsl


#ifndef UNITY_ATMOSPHERIC_SCATTERING_INCLUDED
#define UNITY_ATMOSPHERIC_SCATTERING_INCLUDED
#include "ShaderLibrary/VolumeRendering.hlsl"
#include "CoreRP/ShaderLibrary/VolumeRendering.hlsl"
#include "AtmosphericScattering.cs.hlsl"
#include "../SkyVariables.hlsl"

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/HDRISky/Resources/SkyHDRI.shader


#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/Color.hlsl"
#include "ShaderLibrary/CommonLighting.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Color.hlsl"
#include "CoreRP/ShaderLibrary/CommonLighting.hlsl"
TEXTURECUBE(_Cubemap);
SAMPLER(sampler_Cubemap);

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/ProceduralSky/Resources/ProceduralSky.shader


#pragma multi_compile _ _ENABLE_SUN_DISK
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/Color.hlsl"
#include "ShaderLibrary/CommonLighting.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Color.hlsl"
#include "CoreRP/ShaderLibrary/CommonLighting.hlsl"
float4 _SkyParam; // x exposure, y multiplier, z rotation
float4x4 _PixelCoordToViewDirWS; // Actually just 3x3, but Unity can only set 4x4

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/SceneSettings/Resources/DrawTransmittanceGraph.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/CommonMaterial.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/CommonMaterial.hlsl"
#define USE_LEGACY_UNITY_MATRIX_VARIABLES
#include "../../ShaderVariables.hlsl"
#include "../../Material/SubsurfaceScattering/CommonSubsurfaceScattering.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/SceneSettings/Resources/DrawSssProfile.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#define USE_LEGACY_UNITY_MATRIX_VARIABLES
#include "../../ShaderVariables.hlsl"
#ifdef SSS_MODEL_BASIC

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewTiles.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.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),

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewMaterialGBuffer.shader


#pragma multi_compile _ SHADOWS_SHADOWMASK
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
// CAUTION: In case deferred lighting need to support various lighting model statically, we will require to do multicompile with different define like UNITY_MATERIAL_LIT
#define UNITY_MATERIAL_LIT // Need to be define before including Material.hlsl

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugFullScreen.shader


#pragma vertex Vert
#pragma fragment Frag
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "../Debug/DebugDisplay.cs.hlsl"
#include "../ShaderVariables.hlsl"

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplayLatlong.shader


#pragma vertex Vert
#pragma fragment Frag
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/ImageBasedLighting.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/ImageBasedLighting.hlsl"
TEXTURECUBE(_InputCubemap);
SAMPLER(sampler_InputCubemap);

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDEditorUtils.cs


{
var srpPath = GetScriptableRenderPipelinePath();
if (srpPath != null)
return Path.Combine(srpPath, "ScriptableRenderPipeline/HDRenderPipeline/");
return Path.Combine(srpPath, "ScriptableRenderPipeline/HDRenderPipeline/HDRP/");
return "Packages/com.unity.render-pipelines.high-definition/";
return "Packages/com.unity.render-pipelines.high-definition/HDRP/";
}
public static string GetPostProcessingPath()

{
var srpPath = GetScriptableRenderPipelinePath();
if (srpPath != null)
return Path.Combine(srpPath, "ScriptableRenderPipeline/Core/");
return Path.Combine(srpPath, "ScriptableRenderPipeline/Core/CoreRP");
// If the SRPMARKER is not found, we assume that a package setup is used.
return "Packages/com.unity.render-pipelines.core/";
}

10
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


#if UNITY_EDITOR
static readonly SupportedRenderingFeatures s_NeededFeatures = new SupportedRenderingFeatures()
{
reflectionProbeSupportFlags = SupportedRenderingFeatures.ReflectionProbeSupportFlags.Rotation
reflectionProbeSupportFlags = SupportedRenderingFeatures.ReflectionProbeSupportFlags.Rotation,
defaultMixedLightingMode = SupportedRenderingFeatures.LightmapMixedBakeMode.IndirectOnly,
supportedMixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeMode.IndirectOnly | SupportedRenderingFeatures.LightmapMixedBakeMode.Shadowmask,
supportedLightmapBakeTypes = LightmapBakeType.Baked | LightmapBakeType.Mixed | LightmapBakeType.Realtime,
supportedLightmapsModes = LightmapsMode.NonDirectional | LightmapsMode.CombinedDirectional,
rendererSupportsLightProbeProxyVolumes = true,
rendererSupportsMotionVectors = true,
rendererSupportsReceiveShadows = true,
rendererSupportsReflectionProbes = true
};
#endif

10
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Lighting.hlsl


#ifndef UNITY_LIGHTING_INCLUDED
#define UNITY_LIGHTING_INCLUDED
#include "ShaderLibrary/CommonLighting.hlsl"
#include "ShaderLibrary/CommonShadow.hlsl"
#include "ShaderLibrary/Sampling/Sampling.hlsl"
#include "ShaderLibrary/AreaLighting.hlsl"
#include "ShaderLibrary/ImageBasedLighting.hlsl"
#include "CoreRP/ShaderLibrary/CommonLighting.hlsl"
#include "CoreRP/ShaderLibrary/CommonShadow.hlsl"
#include "CoreRP/ShaderLibrary/Sampling/Sampling.hlsl"
#include "CoreRP/ShaderLibrary/AreaLighting.hlsl"
#include "CoreRP/ShaderLibrary/ImageBasedLighting.hlsl"
// The light loop (or lighting architecture) is in charge to:
// - Define light list

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/scrbound.compute


#pragma kernel ScreenBoundsAABB
#include "ShaderLibrary/common.hlsl"
#include "CoreRP/ShaderLibrary/common.hlsl"
#include "LightLoop.cs.hlsl"
uniform int g_isOrthographic;

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/materialflags.compute


// #pragma enable_d3d11_debug_symbols
#include "ShaderLibrary/common.hlsl"
#include "CoreRP/ShaderLibrary/common.hlsl"
#include "ShaderBase.hlsl"
#include "LightLoop.cs.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild.compute


//#pragma #pragma enable_d3d11_debug_symbols
#include "ShaderLibrary/common.hlsl"
#include "CoreRP/ShaderLibrary/common.hlsl"
#include "ShaderBase.hlsl"
#include "LightLoop.cs.hlsl"
#include "LightingConvexHullUtils.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild-clustered.compute


#pragma kernel TileLightListGen_DepthRT_MSAA_SrcBigTile LIGHTLISTGEN=TileLightListGen_DepthRT_MSAA_SrcBigTile ENABLE_DEPTH_TEXTURE_BACKPLANE MSAA_ENABLED USE_TWO_PASS_TILED_LIGHTING
#pragma kernel ClearAtomic
#include "ShaderLibrary/common.hlsl"
#include "CoreRP/ShaderLibrary/common.hlsl"
#include "ShaderBase.hlsl"
#include "LightLoop.cs.hlsl"
#include "LightingConvexHullUtils.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild-bigtile.compute


#pragma kernel BigTileLightListGen
#include "ShaderLibrary/common.hlsl"
#include "CoreRP/ShaderLibrary/common.hlsl"
#include "LightLoop.cs.hlsl"
#include "LightingConvexHullUtils.hlsl"
#include "SortingComputeUtils.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/builddispatchindirect.compute


#pragma kernel BuildDispatchIndirect
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "LightLoop.cs.hlsl"
#include "../../ShaderVariables.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/ShadowContext.hlsl


#define SHADOWCONTEXT_MAX_COMPSAMPLER 1
#define SHADOW_OPTIMIZE_REGISTER_USAGE 1
#include "ShaderLibrary/Shadow/Shadow.hlsl"
#include "CoreRP/ShaderLibrary/Shadow/Shadow.hlsl"
TEXTURE2D_ARRAY(_ShadowmapExp_VSM_0);
SAMPLER(sampler_ShadowmapExp_VSM_0);

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/Deferred.compute


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/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

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/DeferredDirectionalShadow.compute


// Each #kernel tells which function to compile; you can have many kernels
#pragma kernel DeferredDirectionalShadow
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "../ShaderVariables.hlsl"
#include "Lighting.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Deferred.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/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

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Unlit/Unlit.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/common.hlsl"
#include "CoreRP/ShaderLibrary/common.hlsl"
#include "../../ShaderVariables.hlsl"
#include "../../ShaderPass/FragInputs.hlsl"
#include "../../ShaderPass/ShaderPass.cs.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "../../ShaderVariables.hlsl"
#include "SubsurfaceScattering.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl


#include "SubsurfaceScatteringSettings.cs.hlsl"
#include "ShaderLibrary\Packing.hlsl"
#include "CoreRP/ShaderLibrary/Packing.hlsl"
#include "CommonSubsurfaceScattering.hlsl"
// Subsurface scattering constant

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.compute


// Included headers
//--------------------------------------------------------------------------------------------------
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/Packing.hlsl"
#include "ShaderLibrary/Sampling/Sampling.hlsl"
#include "ShaderLibrary/SpaceFillingCurves.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Packing.hlsl"
#include "CoreRP/ShaderLibrary/Sampling/Sampling.hlsl"
#include "CoreRP/ShaderLibrary/SpaceFillingCurves.hlsl"
#include "../../ShaderVariables.hlsl"
#include "../../Lighting/LightDefinition.cs.hlsl"
#include "SubsurfaceScattering.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SSSProfile.meta


fileFormatVersion: 2
guid: a0ba759eadcfdcc44bc08adad4960ed0
guid: 89c37ca558ceb6c4dadf385321baf125
folderAsset: yes
DefaultImporter:
externalObjects: {}

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/CombineLighting.shader


#pragma vertex Vert
#pragma fragment Frag
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
TEXTURE2D(_IrradianceSource);

16
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Material.hlsl


#ifndef UNITY_MATERIAL_INCLUDED
#define UNITY_MATERIAL_INCLUDED
#include "ShaderLibrary/Color.hlsl"
#include "ShaderLibrary/Packing.hlsl"
#include "ShaderLibrary/BSDF.hlsl"
#include "ShaderLibrary/Debug.hlsl"
#include "ShaderLibrary/GeometricTools.hlsl"
#include "ShaderLibrary/CommonMaterial.hlsl"
#include "ShaderLibrary/EntityLighting.hlsl"
#include "ShaderLibrary/ImageBasedLighting.hlsl"
#include "CoreRP/ShaderLibrary/Color.hlsl"
#include "CoreRP/ShaderLibrary/Packing.hlsl"
#include "CoreRP/ShaderLibrary/BSDF.hlsl"
#include "CoreRP/ShaderLibrary/Debug.hlsl"
#include "CoreRP/ShaderLibrary/GeometricTools.hlsl"
#include "CoreRP/ShaderLibrary/CommonMaterial.hlsl"
#include "CoreRP/ShaderLibrary/EntityLighting.hlsl"
#include "CoreRP/ShaderLibrary/ImageBasedLighting.hlsl"
#include "../Sky/AtmosphericScattering/AtmosphericScattering.hlsl"
// Guidelines for Material Keyword.

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Resources/PreIntegratedFGD.shader


#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/ImageBasedLighting.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/ImageBasedLighting.hlsl"
#include "../../../ShaderVariables.hlsl"
struct Attributes

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitTessellation.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/common.hlsl"
#include "ShaderLibrary/Wind.hlsl"
#include "ShaderLibrary/GeometricTools.hlsl"
#include "ShaderLibrary/tessellation.hlsl"
#include "CoreRP/ShaderLibrary/common.hlsl"
#include "CoreRP/ShaderLibrary/Wind.hlsl"
#include "CoreRP/ShaderLibrary/GeometricTools.hlsl"
#include "CoreRP/ShaderLibrary/tessellation.hlsl"
#include "../../ShaderPass/FragInputs.hlsl"
#include "../../ShaderPass/ShaderPass.cs.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitDataDisplacement.hlsl


return SAMPLE_TEXTURE2D_LOD(_HeightMap, sampler_HeightMap, param.uv + texOffsetCurrent, lod).r;
}
#include "ShaderLibrary/PerPixelDisplacement.hlsl"
#include "CoreRP/ShaderLibrary/PerPixelDisplacement.hlsl"
void ApplyDisplacementTileScale(inout float height)
{

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitData.hlsl


//-------------------------------------------------------------------------------------
// Fill SurfaceData/Builtin data function
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/Sampling/SampleUVMapping.hlsl"
#include "CoreRP/ShaderLibrary/Sampling/SampleUVMapping.hlsl"
#include "../MaterialUtilities.hlsl"
#include "../Decal/DecalUtilities.hlsl"

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/Wind.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Wind.hlsl"
#include "../../ShaderPass/FragInputs.hlsl"
#include "../../ShaderPass/ShaderPass.cs.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl


// Define refraction keyword helpers
#define HAS_REFRACTION (defined(_REFRACTION_PLANE) || defined(_REFRACTION_SPHERE))
#if HAS_REFRACTION
# include "ShaderLibrary/Refraction.hlsl"
# include "CoreRP/ShaderLibrary/Refraction.hlsl"
# if defined(_REFRACTION_PLANE)
# define REFRACTION_MODEL(V, posInputs, bsdfData) RefractionModelPlane(V, posInputs.positionWS, bsdfData.normalWS, bsdfData.ior, bsdfData.thickness)

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLitTessellation.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/common.hlsl"
#include "ShaderLibrary/Wind.hlsl"
#include "ShaderLibrary/GeometricTools.hlsl"
#include "ShaderLibrary/tessellation.hlsl"
#include "CoreRP/ShaderLibrary/common.hlsl"
#include "CoreRP/ShaderLibrary/Wind.hlsl"
#include "CoreRP/ShaderLibrary/GeometricTools.hlsl"
#include "CoreRP/ShaderLibrary/tessellation.hlsl"
#include "../../ShaderPass/FragInputs.hlsl"
#include "../../ShaderPass/ShaderPass.cs.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLitDataDisplacement.hlsl


return BlendLayeredScalar(height0, height1, height2, height3, weights);
}
#include "ShaderLibrary/PerPixelDisplacement.hlsl"
#include "CoreRP/ShaderLibrary/PerPixelDisplacement.hlsl"
#endif // defined(_PIXEL_DISPLACEMENT) && LAYERS_HEIGHTMAP_ENABLE

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLit.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/common.hlsl"
#include "ShaderLibrary/Wind.hlsl"
#include "CoreRP/ShaderLibrary/common.hlsl"
#include "CoreRP/ShaderLibrary/Wind.hlsl"
#include "../../ShaderPass/FragInputs.hlsl"
#include "../../ShaderPass/ShaderPass.cs.hlsl"

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/GGXConvolve.shader


#pragma vertex Vert
#pragma fragment Frag
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/ImageBasedLighting.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/ImageBasedLighting.hlsl"
#include "GGXConvolution.cs.hlsl"
#include "../../ShaderVariables.hlsl"

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/ComputeGgxIblSampleData.compute


// Precomputes data for IntegrateLD(). See that function for a detailed description.
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/ImageBasedLighting.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/ImageBasedLighting.hlsl"
#ifdef SHADER_API_MOBILE
#define MAX_IBL_SAMPLE_CNT 34

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/BuildProbabilityTables.compute


// Ref: PBRT v3, 13.6.7 "Piecewise-Constant 2D Distributions".
// Note that we use the equiareal sphere-to-square mapping instead of the latitude-longitude one.
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/ImageBasedLighting.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/ImageBasedLighting.hlsl"
#include "../../ShaderVariables.hlsl"
/* --- Input --- */

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Decal/DecalData.hlsl


//-------------------------------------------------------------------------------------
// Fill SurfaceData/Builtin data function
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/Packing.hlsl"
#include "ShaderLibrary/Sampling/SampleUVMapping.hlsl"
#include "CoreRP/ShaderLibrary/Packing.hlsl"
#include "CoreRP/ShaderLibrary/Sampling/SampleUVMapping.hlsl"
void GetSurfaceData(float2 texCoordDS, out DecalSurfaceData surfaceData)
{

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Decal/Decal.shader


// Include
//-------------------------------------------------------------------------------------
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/Wind.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Wind.hlsl"
#include "../../ShaderPass/FragInputs.hlsl"
#include "../../ShaderPass/ShaderPass.cs.hlsl"

52
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DepthDownsample.compute


#include "ShaderLibrary/Common.hlsl"
Texture2D<float> _Source;
RWTexture2D<float> _Result;
SamplerState sampler_PointClamp; //TODO: could we use min-sampler instead of using ALU?
CBUFFER_START(cb)
float4 _SrcSize;
CBUFFER_END
#pragma kernel KMain
[numthreads(8, 8, 1)]
void KMain(uint2 groupId : SV_GroupID, uint2 groupThreadId : SV_GroupThreadID, uint2 dispatchThreadId : SV_DispatchThreadID)
{
// Upper-left pixel coordinate of quad that this thread will read
int2 threadUL = dispatchThreadId;
// Downsample the block
float2 offset = float2(threadUL) * 2.0f + 1.0f;
float4 depths = _Source.GatherRed(sampler_PointClamp, offset * _SrcSize.zw, 0.0);
float minDepth = min(min(depths.x, depths.y), min(depths.z, depths.w));
// Write to the final target
_Result[dispatchThreadId] = minDepth;
#include "CoreRP/ShaderLibrary/Common.hlsl"
Texture2D<float> _Source;
RWTexture2D<float> _Result;
SamplerState sampler_PointClamp; //TODO: could we use min-sampler instead of using ALU?
CBUFFER_START(cb)
float4 _SrcSize;
CBUFFER_END
#pragma kernel KMain
[numthreads(8, 8, 1)]
void KMain(uint2 groupId : SV_GroupID, uint2 groupThreadId : SV_GroupThreadID, uint2 dispatchThreadId : SV_DispatchThreadID)
{
// Upper-left pixel coordinate of quad that this thread will read
int2 threadUL = dispatchThreadId;
// Downsample the block
float2 offset = float2(threadUL) * 2.0f + 1.0f;
float4 depths = _Source.GatherRed(sampler_PointClamp, offset * _SrcSize.zw, 0.0);
float minDepth = min(min(depths.x, depths.y), min(depths.z, depths.w));
// Write to the final target
_Result[dispatchThreadId] = minDepth;
}

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/CopyStencilBuffer.shader


#pragma only_renderers d3d11 ps4 xboxone vulkan metal
// #pragma enable_d3d11_debug_symbols
#include "ShaderLibrary/Common.hlsl"
#include "ShaderLibrary/Packing.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Packing.hlsl"
#include "../ShaderVariables.hlsl"
#include "../Lighting/LightDefinition.cs.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/CameraMotionVectors.shader


#pragma target 4.5
#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "../ShaderVariables.hlsl"
#include "../ShaderPass/FragInputs.hlsl"
#include "../ShaderPass/VaryingMesh.hlsl"

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/ApplyDistorsion.compute


#include "ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "../Material/Builtin/BuiltinData.hlsl"
TEXTURE2D(_DistortionTexture);

8
ScriptableRenderPipeline/Core/CoreRP.meta


fileFormatVersion: 2
guid: ece10b06a2a0821449c2c303c83ac5b2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP.meta


fileFormatVersion: 2
guid: 56c241cbe4f435b4f80af23f70f14dea
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

/ScriptableRenderPipeline/Core/Resources.meta → /ScriptableRenderPipeline/Core/CoreRP/Resources.meta

/ScriptableRenderPipeline/Core/TextureSettings.cs.meta → /ScriptableRenderPipeline/Core/CoreRP/TextureSettings.cs.meta

/ScriptableRenderPipeline/Core/TextureCache.cs.meta → /ScriptableRenderPipeline/Core/CoreRP/TextureCache.cs.meta

/ScriptableRenderPipeline/Core/Shadow.meta → /ScriptableRenderPipeline/Core/CoreRP/Shadow.meta

/ScriptableRenderPipeline/Core/Debugging.meta → /ScriptableRenderPipeline/Core/CoreRP/Debugging.meta

/ScriptableRenderPipeline/Core/Camera.meta → /ScriptableRenderPipeline/Core/CoreRP/Camera.meta

/ScriptableRenderPipeline/Core/Singleton.cs.meta → /ScriptableRenderPipeline/Core/CoreRP/Singleton.cs.meta

/ScriptableRenderPipeline/Core/Singleton.cs → /ScriptableRenderPipeline/Core/CoreRP/Singleton.cs

/ScriptableRenderPipeline/Core/Camera → /ScriptableRenderPipeline/Core/CoreRP/Camera

/ScriptableRenderPipeline/Core/TextureSettings.cs → /ScriptableRenderPipeline/Core/CoreRP/TextureSettings.cs

/ScriptableRenderPipeline/Core/ShaderLibrary.meta → /ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary.meta

/ScriptableRenderPipeline/Core/ShaderGenerator → /ScriptableRenderPipeline/Core/CoreRP/ShaderGenerator

/ScriptableRenderPipeline/Core/ShaderGenerator.meta → /ScriptableRenderPipeline/Core/CoreRP/ShaderGenerator.meta

/ScriptableRenderPipeline/Core/Editor.meta → /ScriptableRenderPipeline/Core/CoreRP/Editor.meta

/ScriptableRenderPipeline/Core/SceneRenderPipeline.cs → /ScriptableRenderPipeline/Core/CoreRP/SceneRenderPipeline.cs

/ScriptableRenderPipeline/Core/SceneRenderPipeline.cs.meta → /ScriptableRenderPipeline/Core/CoreRP/SceneRenderPipeline.cs.meta

/ScriptableRenderPipeline/Core/CommandBufferPool.cs.meta → /ScriptableRenderPipeline/Core/CoreRP/CommandBufferPool.cs.meta

/ScriptableRenderPipeline/Core/Inputs.meta → /ScriptableRenderPipeline/Core/CoreRP/Inputs.meta

/ScriptableRenderPipeline/Core/Inputs → /ScriptableRenderPipeline/Core/CoreRP/Inputs

/ScriptableRenderPipeline/Core/TextureCache.cs → /ScriptableRenderPipeline/Core/CoreRP/TextureCache.cs

/ScriptableRenderPipeline/Core/CoreUtils.cs.meta → /ScriptableRenderPipeline/Core/CoreRP/CoreUtils.cs.meta

/ScriptableRenderPipeline/Core/ProfilingSample.cs.meta → /ScriptableRenderPipeline/Core/CoreRP/ProfilingSample.cs.meta

/ScriptableRenderPipeline/Core/ProfilingSample.cs → /ScriptableRenderPipeline/Core/CoreRP/ProfilingSample.cs

/ScriptableRenderPipeline/Core/CommandBufferPool.cs → /ScriptableRenderPipeline/Core/CoreRP/CommandBufferPool.cs

/ScriptableRenderPipeline/Core/Shadow → /ScriptableRenderPipeline/Core/CoreRP/Shadow

/ScriptableRenderPipeline/Core/CoreUtils.cs → /ScriptableRenderPipeline/Core/CoreRP/CoreUtils.cs

/ScriptableRenderPipeline/Core/EncodeBC6H.cs → /ScriptableRenderPipeline/Core/CoreRP/EncodeBC6H.cs

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存