浏览代码

Merge branch 'master' into vertexAnimHDRP2

# Conflicts:
#	com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRPass.template
#	com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDUnlitPassForward.template
/main
Chris Tchou 6 年前
当前提交
e8ce5056
共有 125 个文件被更改,包括 1110 次插入883 次删除
  1. 8
      TestProjects/LWGraphicsTest/Packages/manifest.json
  2. 9
      com.unity.render-pipelines.core/CoreRP/Editor/CoreEditorUtils.cs
  3. 4
      com.unity.render-pipelines.core/CoreRP/Editor/Debugging/DebugWindow.cs
  4. 44
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/D3D11.hlsl
  5. 23
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/GLCore.hlsl
  6. 2
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/GLES2.hlsl
  7. 23
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/GLES3.hlsl
  8. 41
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/Metal.hlsl
  9. 44
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/PSSL.hlsl
  10. 44
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/Switch.hlsl
  11. 44
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/Vulkan.hlsl
  12. 44
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/XBoxOne.hlsl
  13. 13
      com.unity.render-pipelines.core/CoreRP/Utilities/CoreUtils.cs
  14. 7
      com.unity.render-pipelines.high-definition/CHANGELOG.md
  15. 5
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Drawers.cs
  16. 4
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedPlanarReflectionProbe.cs
  17. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRPass.template
  18. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDUnlitPassForward.template
  19. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPreprocessShaders.cs.meta
  20. 4
      com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPreprocessShaders.cs
  21. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPPreprocessBuild.cs.meta
  22. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPPreprocessBuild.cs
  23. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors/NormalMapAverageLengthTexturePostprocessor.cs.meta
  24. 3
      com.unity.render-pipelines.high-definition/HDRP/Material/LayeredLit/LayeredLit.shader
  25. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/LayeredLit/LayeredLitData.hlsl
  26. 3
      com.unity.render-pipelines.high-definition/HDRP/Material/LayeredLit/LayeredLitTessellation.shader
  27. 14
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl
  28. 3
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.shader
  29. 3
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/LitTessellation.shader
  30. 16
      com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.hlsl
  31. 3
      com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.shader
  32. 3
      com.unity.render-pipelines.high-definition/HDRP/Material/Unlit/Unlit.shader
  33. 1
      com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/DefaultHDDecalMaterial.mat
  34. 1
      com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/DefaultHDMaterial.mat
  35. 1
      com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/DefaultHDMirrorMaterial.mat
  36. 2
      com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/DepthPyramid.compute
  37. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDAssetFactory.cs
  38. 26
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs
  39. 11
      com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalProjectorComponent.cs
  40. 19
      com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalSystem.cs
  41. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors.meta
  42. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors.meta
  43. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline.meta
  44. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipelineResources.meta
  45. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders.meta
  46. 8
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings.meta
  47. 316
      com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs
  48. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/Settings.meta
  49. 75
      com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/HDRPVersion.cs
  50. 11
      com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/HDRPVersion.cs.meta
  51. 351
      com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/UpgradeMenuItem.cs
  52. 11
      com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/UpgradeMenuItem.cs.meta
  53. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/Decal.meta
  54. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/EditorRenderPipelineResources.meta
  55. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/RenderLoopSettings.meta
  56. 625
      com.unity.render-pipelines.high-definition/HDRP/Editor/HDRenderPipelineMenuItems.cs
  57. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/BuildPlayer.meta
  58. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/AssetPostProcessors.meta
  59. 8
      com.unity.render-pipelines.high-definition/HDRP/Decal.meta
  60. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipelineResources
  61. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors
  62. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPreprocessShaders.cs.meta
  63. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPreprocessShaders.cs
  64. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPPreprocessBuild.cs.meta
  65. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPPreprocessBuild.cs
  66. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors
  67. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors/NormalMapAverageLengthTexturePostprocessor.cs.meta
  68. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors/NormalMapAverageLengthTexturePostprocessor.cs
  69. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/UpgradeStandardShaderMaterials.cs.meta
  70. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs.meta
  71. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDAssetFactory.cs.meta
  72. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDEditorUtils.cs.meta
  73. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDBaseEditor.cs
  74. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDBaseEditor.cs.meta
  75. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDEditorCLI.cs
  76. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDEditorCLI.cs.meta
  77. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/cli.ps1
  78. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/cli.ps1.meta
  79. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/UpgradeStandardShaderMaterials.cs
  80. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDEditorUtils.cs
  81. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDShaderIncludePaths.cs
  82. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDShaderIncludePaths.cs.meta
  83. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/BaseUI.cs
  84. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/BaseUI.cs.meta
  85. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDAssetFactory.cs
  86. 0
      /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/Settings
  87. 0
      /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/RenderPipelineSettings.cs.meta
  88. 0
      /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/FrameSettings.cs.meta
  89. 0
      /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/FrameSettings.cs
  90. 0
      /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/RenderPipelineSettings.cs
  91. 0
      /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDUtils.cs.meta
  92. 0
      /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDUtils.cs
  93. 0
      /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDStringConstants.cs.meta
  94. 0
      /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderQueue.cs.meta
  95. 0
      /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderQueue.cs

8
TestProjects/LWGraphicsTest/Packages/manifest.json


{
"dependencies": {
"com.unity.postprocessing": "file:../../../../com.unity.postprocessing",
"com.unity.render-pipelines.core": "file:../../../../com.unity.render-pipelines.core",
"com.unity.shadergraph": "file:../../../../com.unity.shadergraph",
"com.unity.render-pipelines.lightweight": "file:../../../../com.unity.render-pipelines.lightweight"
"com.unity.postprocessing": "file:../../../com.unity.postprocessing",
"com.unity.render-pipelines.core": "file:../../../com.unity.render-pipelines.core",
"com.unity.shadergraph": "file:../../../com.unity.shadergraph",
"com.unity.render-pipelines.lightweight": "file:../../../com.unity.render-pipelines.lightweight"
}
}

9
com.unity.render-pipelines.core/CoreRP/Editor/CoreEditorUtils.cs


using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

static public GameObject CreateGameObject(GameObject parent, string name, params Type[] types)
{
return ObjectFactory.CreateGameObject(GameObjectUtility.GetUniqueNameForSibling(parent != null ? parent.transform : null, name), types);
}
static public string GetCurrentProjectVersion()
{
string[] readText = File.ReadAllLines("ProjectSettings/ProjectVersion.txt");
// format is m_EditorVersion: 2018.2.0b7
string[] versionText = readText[0].Split(' ');
return versionText[1];
}
}

4
com.unity.render-pipelines.core/CoreRP/Editor/Debugging/DebugWindow.cs


s_TypeMapDirty = false;
}
[MenuItem("Window/Render Pipeline/Debug Window", priority = CoreUtils.editMenuPriority2)]
[MenuItem("Window/General/Render Pipeline Debug", priority = CoreUtils.editMenuPriority2)]
window.titleContent = new GUIContent("Debugging");
window.titleContent = new GUIContent("Debug");
}
void OnEnable()

44
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/D3D11.hlsl


#define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_ARRAY(textureName)
#define RW_TEXTURE2D(type, textureName) RWTexture2D<type> textureName
#define RW_TEXTURE2D_ARRAY(type, textureName) RWTexture2DArray<type> textureName
#define RW_TEXTURE3D(type, textureName) RWTexture3D<type> textureName
#define SAMPLER(samplerName) SamplerState samplerName

#define TEXTURECUBE_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define TEXTURECUBE_ARRAY_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) textureName.SampleGrad(samplerName, float3(coord2, index), dpdx, dpdy)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D_SHADOW(textureName, samplerName, coord3) textureName.SampleCmpLevelZero(samplerName, (coord3).xy, (coord3).z)
#define SAMPLE_TEXTURE2D_ARRAY_SHADOW(textureName, samplerName, coord3, index) textureName.SampleCmpLevelZero(samplerName, float3((coord3).xy, index), (coord3).z)

#define LOAD_TEXTURE3D_LOD(textureName, unCoord3, lod) textureName.Load(int4(unCoord3, lod))
#define PLATFORM_SUPPORT_GATHER
#define GATHER_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.Gather(samplerName, coord2, offset)
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index), offset)
#define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2)
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index))
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherRed(samplerName, coord2, offset)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherGreen(samplerName, coord2, offset)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherBlue(samplerName, coord2, offset)
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2)
#define GATHER_ALPHA_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherAlpha(samplerName, coord2)

23
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/GLCore.hlsl


#define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_ARRAY(textureName)
#define RW_TEXTURE2D(type, textureName) RWTexture2D<type> textureName
#define RW_TEXTURE2D_ARRAY(type, textureName) RWTexture2DArray<type> textureName
#define RW_TEXTURE3D(type, textureName) RWTexture3D<type> textureName
#define SAMPLER(samplerName) SamplerState samplerName

#define TEXTURECUBE_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define TEXTURECUBE_ARRAY_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, ddx, ddy) textureName.SampleGrad(samplerName, coord2, ddx, ddy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, ddx, ddy) textureName.SampleGrad(samplerName, coord2, ddx, ddy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) textureName.SampleGrad(samplerName, float3(coord2, index), dpdx, dpdy)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#ifdef UNITY_NO_CUBEMAP_ARRAY
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) ERROR_ON_UNSUPPORTED_FUNCTION(SAMPLE_TEXTURECUBE_ARRAY)
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) ERROR_ON_UNSUPPORTED_FUNCTION(SAMPLE_TEXTURECUBE_ARRAY_LOD)

#define GATHER_TEXTURECUBE(textureName, samplerName, coord3) ERROR_ON_UNSUPPORTED_FUNCTION(GATHER_TEXTURECUBE)
#define GATHER_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) ERROR_ON_UNSUPPORTED_FUNCTION(GATHER_TEXTURECUBE_ARRAY)
#endif

2
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/GLES2.hlsl


#define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_SHADOW(textureName) // No support to texture array
#define RW_TEXTURE2D(type, textureNam) ERROR_ON_UNSUPPORTED_FUNCTION(RWTexture2D)
#define RW_TEXTURE2D_ARRAY(type, textureName) ERROR_ON_UNSUPPORTED_FUNCTION(RWTexture2DArray)
#define RW_TEXTURE3D(type, textureNam) ERROR_ON_UNSUPPORTED_FUNCTION(RWTexture3D)
#define SAMPLER(samplerName)

#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) ERROR_ON_UNSUPPORTED_FUNCTION(SAMPLE_TEXTURE2D_ARRAY)
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) ERROR_ON_UNSUPPORTED_FUNCTION(SAMPLE_TEXTURE2D_ARRAY_LOD)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) ERROR_ON_UNSUPPORTED_FUNCTION(SAMPLE_TEXTURE2D_ARRAY_BIAS)
#define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) ERROR_ON_UNSUPPORTED_FUNCTION(SAMPLE_TEXTURE2D_ARRAY_GRAD)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) texCUBE(textureName, coord3)
// No lod support. Very poor approximation with bias.
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, lod)

23
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/GLES3.hlsl


#define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_ARRAY(textureName)
#define RW_TEXTURE2D(type, textureName) ERROR_ON_UNSUPPORTED_FUNCTION(RWTexture2D)
#define RW_TEXTURE2D_ARRAY(type, textureName) ERROR_ON_UNSUPPORTED_FUNCTION(RWTexture2DArray)
#define RW_TEXTURE3D(type, textureName) ERROR_ON_UNSUPPORTED_FUNCTION(RWTexture3D)
#define SAMPLER(samplerName) SamplerState samplerName

#define TEXTURECUBE_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define TEXTURECUBE_ARRAY_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, ddx, ddy) textureName.SampleGrad(samplerName, coord2, ddx, ddy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, ddx, ddy) textureName.SampleGrad(samplerName, coord2, ddx, ddy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) textureName.SampleGrad(samplerName, float3(coord2, index), dpdx, dpdy)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#ifdef UNITY_NO_CUBEMAP_ARRAY
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) ERROR_ON_UNSUPPORTED_FUNCTION(SAMPLE_TEXTURECUBE_ARRAY)

#define GATHER_TEXTURECUBE(textureName, samplerName, coord3) ERROR_ON_UNSUPPORTED_FUNCTION(GATHER_TEXTURECUBE)
#define GATHER_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) ERROR_ON_UNSUPPORTED_FUNCTION(GATHER_TEXTURECUBE_ARRAY)
#endif

41
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/Metal.hlsl


#define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_ARRAY(textureName)
#define RW_TEXTURE2D(type, textureName) RWTexture2D<type> textureName
#define RW_TEXTURE2D_ARRAY(type, textureName) RWTexture2DArray<type> textureName
#define RW_TEXTURE3D(type, textureName) RWTexture3D<type> textureName
#define SAMPLER(samplerName) SamplerState samplerName

#define TEXTURECUBE_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define TEXTURECUBE_ARRAY_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) textureName.SampleGrad(samplerName, float3(coord2, index), dpdx, dpdy)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D_SHADOW(textureName, samplerName, coord3) textureName.SampleCmpLevelZero(samplerName, (coord3).xy, (coord3).z)
#define SAMPLE_TEXTURE2D_ARRAY_SHADOW(textureName, samplerName, coord3, index) textureName.SampleCmpLevelZero(samplerName, float3((coord3).xy, index), (coord3).z)

#define LOAD_TEXTURE3D(textureName, unCoord3) textureName.Load(int4(unCoord3, 0))
#define LOAD_TEXTURE3D_LOD(textureName, unCoord3, lod) textureName.Load(int4(unCoord3, lod))
#define PLATFORM_SUPPORT_GATHER
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2)
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2)
#define GATHER_ALPHA_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherAlpha(samplerName, coord2)

44
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/PSSL.hlsl


#define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_ARRAY(textureName)
#define RW_TEXTURE2D(type, textureName) RW_Texture2D<type> textureName
#define RW_TEXTURE2D_ARRAY(type, textureName) RW_Texture2D_Array<type> textureName
#define RW_TEXTURE3D(type, textureName) RW_Texture3D<type> textureName
#define SAMPLER(samplerName) SamplerState samplerName

#define TEXTURECUBE_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define TEXTURECUBE_ARRAY_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) textureName.SampleGrad(samplerName, float3(coord2, index), dpdx, dpdy)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D_SHADOW(textureName, samplerName, coord3) textureName.SampleCmpLevelZero(samplerName, (coord3).xy, (coord3).z)
#define SAMPLE_TEXTURE2D_ARRAY_SHADOW(textureName, samplerName, coord3, index) textureName.SampleCmpLevelZero(samplerName, float3((coord3).xy, index), (coord3).z)

#define LOAD_TEXTURE3D_LOD(textureName, unCoord3, lod) textureName.Load(int4(unCoord3, lod))
#define PLATFORM_SUPPORT_GATHER
#define GATHER_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.Gather(samplerName, coord2, offset)
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index), offset)
#define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2)
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index))
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherRed(samplerName, coord2, offset)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherGreen(samplerName, coord2, offset)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherBlue(samplerName, coord2, offset)
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2)
#define GATHER_ALPHA_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherAlpha(samplerName, coord2)

44
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/Switch.hlsl


#define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_ARRAY(textureName)
#define RW_TEXTURE2D(type, textureName) RWTexture2D<type> textureName
#define RW_TEXTURE2D_ARRAY(type, textureName) RWTexture2DArray<type> textureName
#define RW_TEXTURE3D(type, textureName) RWTexture3D<type> textureName
#define SAMPLER(samplerName) SamplerState samplerName

#define TEXTURECUBE_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define TEXTURECUBE_ARRAY_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) textureName.SampleGrad(samplerName, float3(coord2, index), dpdx, dpdy)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D_SHADOW(textureName, samplerName, coord3) textureName.SampleCmpLevelZero(samplerName, (coord3).xy, (coord3).z)
#define SAMPLE_TEXTURE2D_ARRAY_SHADOW(textureName, samplerName, coord3, index) textureName.SampleCmpLevelZero(samplerName, float3((coord3).xy, index), (coord3).z)

#define LOAD_TEXTURE3D_LOD(textureName, unCoord3, lod) textureName.Load(int4(unCoord3, lod))
#define PLATFORM_SUPPORT_GATHER
#define GATHER_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.Gather(samplerName, coord2, offset)
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index), offset)
#define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2)
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index))
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherRed(samplerName, coord2, offset)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherGreen(samplerName, coord2, offset)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherBlue(samplerName, coord2, offset)
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2)
#define GATHER_ALPHA_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherAlpha(samplerName, coord2)

44
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/Vulkan.hlsl


#define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_ARRAY(textureName)
#define RW_TEXTURE2D(type, textureName) RWTexture2D<type> textureName
#define RW_TEXTURE2D_ARRAY(type, textureName) RWTexture2DArray<type> textureName
#define RW_TEXTURE3D(type, textureName) RWTexture3D<type> textureName
#define SAMPLER(samplerName) SamplerState samplerName

#define TEXTURECUBE_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define TEXTURECUBE_ARRAY_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) textureName.SampleGrad(samplerName, float3(coord2, index), dpdx, dpdy)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D_SHADOW(textureName, samplerName, coord3) textureName.SampleCmpLevelZero(samplerName, (coord3).xy, (coord3).z)
#define SAMPLE_TEXTURE2D_ARRAY_SHADOW(textureName, samplerName, coord3, index) textureName.SampleCmpLevelZero(samplerName, float3((coord3).xy, index), (coord3).z)

#define LOAD_TEXTURE3D_LOD(textureName, unCoord3, lod) textureName.Load(int4(unCoord3, lod))
#define PLATFORM_SUPPORT_GATHER
#define GATHER_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.Gather(samplerName, coord2, offset)
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index), offset)
#define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2)
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index))
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherRed(samplerName, coord2, offset)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherGreen(samplerName, coord2, offset)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherBlue(samplerName, coord2, offset)
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2)
#define GATHER_ALPHA_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherAlpha(samplerName, coord2)

44
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/API/XBoxOne.hlsl


#define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_ARRAY(textureName)
#define RW_TEXTURE2D(type, textureName) RWTexture2D<type> textureName
#define RW_TEXTURE2D_ARRAY(type, textureName) RWTexture2DArray<type> textureName
#define RW_TEXTURE3D(type, textureName) RWTexture3D<type> textureName
#define SAMPLER(samplerName) SamplerState samplerName

#define TEXTURECUBE_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define TEXTURECUBE_ARRAY_SHADOW_PARAM(textureName, samplerName) textureName, samplerName
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias)
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy)
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index))
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod)
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias)
#define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) textureName.SampleGrad(samplerName, float3(coord2, index), dpdx, dpdy)
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index))
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod)
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias)
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod)
#define SAMPLE_TEXTURE2D_SHADOW(textureName, samplerName, coord3) textureName.SampleCmpLevelZero(samplerName, (coord3).xy, (coord3).z)
#define SAMPLE_TEXTURE2D_ARRAY_SHADOW(textureName, samplerName, coord3, index) textureName.SampleCmpLevelZero(samplerName, float3((coord3).xy, index), (coord3).z)

#define LOAD_TEXTURE3D_LOD(textureName, unCoord3, lod) textureName.Load(int4(unCoord3, lod))
#define PLATFORM_SUPPORT_GATHER
#define GATHER_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.Gather(samplerName, coord2, offset)
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index), offset)
#define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2)
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index))
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherRed(samplerName, coord2, offset)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherGreen(samplerName, coord2, offset)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherBlue(samplerName, coord2, offset)
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2)
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2)
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2)
#define GATHER_ALPHA_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherAlpha(samplerName, coord2)

13
com.unity.render-pipelines.core/CoreRP/Utilities/CoreUtils.cs


return fogEnable;
}
static public void CheckOutFile(bool VSCEnabled, UnityObject mat)
{
if (VSCEnabled)
{
UnityEditor.VersionControl.Task task = UnityEditor.VersionControl.Provider.Checkout(mat, UnityEditor.VersionControl.CheckoutMode.Both);
if (!task.success)
{
Debug.Log(task.text + " " + task.resultCode);
}
}
}
}
}

7
com.unity.render-pipelines.high-definition/CHANGELOG.md


- Allow to double click on a render pipeline asset to setup it automatically in GraphicSettings
- Add shortcut to create DensityVolume and PlanarReflection in hierarchy
- Add a DefaultHDMirrorMaterial material for PlanarReflection
- Added a script to be able to upgrade material to newer version of HDRP
- Removed useless duplication of ForwardError passes.
### Changed, Removals and deprecations
- Removed GlobalLightLoopSettings.maxPlanarReflectionProbes and instead use value of GlobalLightLoopSettings.planarReflectionProbeCacheSize

- Create unique name when creating a game object in the rendering menu (i.e Density Volume(2))
- Re-organize various files and folder location to clean the repository
- Change Debug windows name and location. Now located at: Windows -> General -> Render Pipeline Debug
### Bug fixes
- Fix issue with LOD transition and instancing

- Fix warning when creating Planar reflection
- Fix specular lighting debug mode (was rendering black)
- Allow projector decal with null material to allow to configure decal when HDRP is not set
## [2018.1 undecided]

5
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Drawers.cs


);
Inspector = CED.Group(
SectionProbeModeSettings,
//SectionProbeModeSettings,
CED.space,
CED.Action((s, d, o) => EditorGUILayout.LabelField(_.GetContent("Proxy Volume"), EditorStyles.boldLabel)),
CED.Action(Drawer_FieldProxyVolumeReference),

GUI.enabled = false;
EditorGUILayout.PropertyField(d.refreshMode, _.GetContent("Refresh Mode"));
EditorGUILayout.PropertyField(d.capturePositionMode, _.GetContent("Capture Position Mode"));
d.refreshMode.enumValueIndex = (int)ReflectionProbeRefreshMode.EveryFrame;
d.capturePositionMode.enumValueIndex = (int)PlanarReflectionProbe.CapturePositionMode.MirrorCamera;
GUI.enabled = true;
}

{
GUI.enabled = false;
EditorGUILayout.PropertyField(d.mode, _.GetContent("Type"));
d.mode.enumValueIndex = (int)ReflectionProbeMode.Realtime;
GUI.enabled = true;
}

4
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedPlanarReflectionProbe.cs


{
serializedObject.Update();
mode.enumValueIndex = (int)ReflectionProbeMode.Realtime;
refreshMode.enumValueIndex = (int)ReflectionProbeRefreshMode.EveryFrame;
capturePositionMode.enumValueIndex = (int)PlanarReflectionProbe.CapturePositionMode.MirrorCamera;
var updateProxyVolume = reflectionProxyVolume != null
&& serializedObject.targetObjects.Length != reflectionProxyVolume.serializedObject.targetObjects.Length;
if (!updateProxyVolume && reflectionProxyVolume != null)

8
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRPass.template


//-------------------------------------------------------------------------------------
HLSLPROGRAM
#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
//#pragma enable_d3d11_debug_symbols

// TODO: positionSS is SV_Position, graph input expects screenPosition to be 0..1 across the active viewport (?)
$SurfaceDescriptionInputs.ScreenPosition: output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(input.positionWS), _ProjectionParams.x);
$SurfaceDescriptionInputs.VertexColor: output.VertexColor = input.color;
return output;

builtinData.opacity = surfaceDescription.Alpha;
builtinData.bakeDiffuseLighting = SampleBakedGI(fragInputs.positionWS, bentNormalWS, fragInputs.texCoord1, fragInputs.texCoord2); // see GetBuiltinData()
// It is safe to call this function here as surfaceData have been filled
// We want to know if we must enable transmission on GI for SSS material, if the material have no SSS, this code will be remove by the compiler.
BSDFData bsdfData = ConvertSurfaceDataToBSDFData(surfaceData);

8
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDUnlitPassForward.template


//-------------------------------------------------------------------------------------
HLSLPROGRAM
#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
//#pragma enable_d3d11_debug_symbols

// TODO: positionSS is SV_Position, graph input expects screenPosition to be 0..1 across the active viewport (?)
$SurfaceDescriptionInputs.ScreenPosition: output.ScreenPosition = ComputeScreenPos(TransformWorldToHClip(input.positionWS), _ProjectionParams.x);
$SurfaceDescriptionInputs.VertexColor: output.VertexColor = input.color;
return output;

builtinData.opacity = surfaceDescription.Alpha;
builtinData.bakeDiffuseLighting = float3(0.0, 0.0, 0.0);
$SurfaceDescription.Emission: builtinData.emissiveColor = surfaceDescription.Emission;
builtinData.velocity = float2(0.0, 0.0);
builtinData.shadowMask0 = 0.0;

2
com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPreprocessShaders.cs.meta


fileFormatVersion: 2
guid: 168f8e50628e857489eb62f41d9c911f
guid: d342206cb3c614b4fa4caee7fb269b93
MonoImporter:
externalObjects: {}
serializedVersion: 2

4
com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPreprocessShaders.cs


namespace UnityEditor.Experimental.Rendering.HDPipeline
{
class HDRPVariantStripper : IPreprocessShaders
class HDRPreprocessShaders : IPreprocessShaders
{
// returns true if the variant should be stripped.
delegate bool VariantStrippingFunc(Shader shader, ShaderSnippetData snippet, ShaderCompilerData inputData);

//ShaderKeyword m_FeatureSSS;
public HDRPVariantStripper()
public HDRPreprocessShaders()
{
// TODO: Grab correct configuration/quality asset.
HDRenderPipeline hdPipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline;

2
com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPPreprocessBuild.cs.meta


fileFormatVersion: 2
guid: 2ae263b0b434c7e4d9229fde8f6096c5
guid: 0c6c205acc48bbd4c9cbf70d66fa9ffc
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPPreprocessBuild.cs


using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;
class HDRPCustomBuildProcessor : IPreprocessBuildWithReport
class HDRPPreprocessBuild : IPreprocessBuildWithReport
{
public int callbackOrder { get { return 0; } }

2
com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors/NormalMapAverageLengthTexturePostprocessor.cs.meta


fileFormatVersion: 2
guid: c7467d803a5cf8c479b64fbdac53aa41
guid: 3ceae5765b6bbee4fb4f76acdaae9130
MonoImporter:
externalObjects: {}
serializedVersion: 2

3
com.unity.render-pipelines.high-definition/HDRP/Material/LayeredLit/LayeredLit.shader


{
Properties
{
// Versioning of material to help for upgrading
[HideInInspector] _HdrpVersion("_HdrpVersion", Float) = 1
// Following set of parameters represent the parameters node inside the MaterialGraph.
// They are use to fill a SurfaceData. With a MaterialGraph this should not exist.

2
com.unity.render-pipelines.high-definition/HDRP/Material/LayeredLit/LayeredLitData.hlsl


// Normalize
maxHeight = GetMaxHeight(maskedHeights);
maskedHeights = maskedHeights / maxHeight.xxxx;
maskedHeights = maskedHeights / max(maxHeight.xxxx, 1e-6);
return maskedHeights.yzwx;
}

3
com.unity.render-pipelines.high-definition/HDRP/Material/LayeredLit/LayeredLitTessellation.shader


{
Properties
{
// Versioning of material to help for upgrading
[HideInInspector] _HdrpVersion("_HdrpVersion", Float) = 1
// Following set of parameters represent the parameters node inside the MaterialGraph.
// They are use to fill a SurfaceData. With a MaterialGraph this should not exist.

14
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl


if (_DebugLightingMode != 0)
{
bool keepSpecular = false;
// Caution: _DebugLightingMode is used in other part of the code, don't do anything outside of
// current cases
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting
else
keepSpecular = true;
else
keepSpecular = true;
if (!keepSpecular)
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting
}
else if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE)
{

3
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.shader


{
Properties
{
// Versioning of material to help for upgrading
[HideInInspector] _HdrpVersion("_HdrpVersion", Float) = 1
// Following set of parameters represent the parameters node inside the MaterialGraph.
// They are use to fill a SurfaceData. With a MaterialGraph this should not exist.

3
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/LitTessellation.shader


{
Properties
{
// Versioning of material to help for upgrading
[HideInInspector] _HdrpVersion("_HdrpVersion", Float) = 1
// Following set of parameters represent the parameters node inside the MaterialGraph.
// They are use to fill a SurfaceData. With a MaterialGraph this should not exist.

16
com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.hlsl


if (_DebugLightingMode != 0)
{
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting
// Caution: _DebugLightingMode is used in other part of the code, don't do anything outside of
// current cases
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting
//diffuseLighting = aoFactor.indirectSpecularOcclusion;
diffuseLighting = aoFactor.indirectSpecularOcclusion;
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting
// diffuseLighting = lighting.indirect.specularTransmitted;
// diffuseLighting = lighting.indirect.specularTransmitted;
break;
case DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFLECTION:
//if (_DebugLightingSubMode != DEBUGSCREENSPACETRACING_COLOR)
// diffuseLighting = lighting.indirect.specularReflected;
break;
}
}

3
com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.shader


{
Properties
{
// Versioning of material to help for upgrading
[HideInInspector] _HdrpVersion("_HdrpVersion", Float) = 1
// Following set of parameters represent the parameters node inside the MaterialGraph.
// They are use to fill a SurfaceData. With a MaterialGraph this should not exist.

3
com.unity.render-pipelines.high-definition/HDRP/Material/Unlit/Unlit.shader


{
Properties
{
// Versioning of material to help for upgrading
[HideInInspector] _HdrpVersion("_HdrpVersion", Float) = 1
// Be careful, do not change the name here to _Color. It will conflict with the "fake" parameters (see end of properties) required for GI.
_UnlitColor("Color", Color) = (1,1,1,1)
_UnlitColorMap("ColorMap", 2D) = "white" {}

1
com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/DefaultHDDecalMaterial.mat


- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveIntensity: 0
- _EnableBlendModeAccurateLighting: 1
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1

1
com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/DefaultHDMaterial.mat


- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveIntensity: 0
- _EnableBlendModeAccurateLighting: 1
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1

1
com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/DefaultHDMirrorMaterial.mat


- _Drag: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveIntensity: 0
- _EnableBlendModeAccurateLighting: 1
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1

2
com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/DepthPyramid.compute


float2 offset = float2(srcPixelUL) + 0.5;
#if defined(PLATFORM_SUPPORT_GATHER)
float4 depths = GATHER_RED_TEXTURE2D(_Source, sampler_PointClamp, offset * _SrcSize.zw, 0.0).wzxy;
float4 depths = GATHER_RED_TEXTURE2D(_Source, sampler_PointClamp, offset * _SrcSize.zw).wzxy;
#else
float p00 = SAMPLE_TEXTURE2D_LOD(_Source, sampler_PointClamp, (offset) * _SrcSize.zw, 0.0).x;
float p10 = SAMPLE_TEXTURE2D_LOD(_Source, sampler_PointClamp, (offset + float2(1.0, 0.0)) * _SrcSize.zw, 0.0).x;

2
com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDAssetFactory.cs


newAsset.skyboxCubemap = Shader.Find("Skybox/Cubemap");
// Material
newAsset.preIntegratedFGD = Load<Shader>(HDRenderPipelinePath + "Material/PreIntegratedFGD.shader");
newAsset.preIntegratedFGD = Load<Shader>(HDRenderPipelinePath + "Material/PreIntegratedFGD/PreIntegratedFGD.shader");
// Utilities / Core
newAsset.encodeBC6HCS = Load<ComputeShader>(CorePath + "CoreResources/EncodeBC6H.compute");

26
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs


RTHandleSystem.RTHandle m_DistortionBuffer;
// The pass "SRPDefaultUnlit" is a fall back to legacy unlit rendering and is required to support unity 2d + unity UI that render in the scene.
ShaderPassName[] m_ForwardAndForwardOnlyPassNames = { new ShaderPassName(), new ShaderPassName(), HDShaderPassNames.s_SRPDefaultUnlitName };
ShaderPassName[] m_ForwardOnlyPassNames = { new ShaderPassName(), HDShaderPassNames.s_SRPDefaultUnlitName };
ShaderPassName[] m_ForwardAndForwardOnlyPassNames = { HDShaderPassNames.s_ForwardOnlyName, HDShaderPassNames.s_ForwardName, HDShaderPassNames.s_SRPDefaultUnlitName };
ShaderPassName[] m_ForwardOnlyPassNames = { HDShaderPassNames.s_ForwardOnlyName, HDShaderPassNames.s_SRPDefaultUnlitName };
ShaderPassName[] m_AllTransparentPassNames = { HDShaderPassNames.s_TransparentBackfaceName,
HDShaderPassNames.s_ForwardOnlyName,

StartStereoRendering(renderContext, hdCamera);
RenderForward(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Opaque);
RenderForwardError(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Opaque);
// SSS pass here handle both SSS material from deferred and forward
m_SSSBufferManager.SubsurfaceScatteringPass(hdCamera, cmd, diffusionProfileSettings,

// Render pre refraction objects
RenderForward(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.PreRefraction);
RenderForwardError(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.PreRefraction);
RenderForwardError(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Transparent);
// Render All forward error
RenderForwardError(m_CullResults, hdCamera, renderContext, cmd);
// Fill depth buffer to reduce artifact for transparent object during postprocess
RenderTransparentDepthPostpass(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Transparent);

HDUtils.SetRenderTarget(cmd, hdCamera, m_CameraColorBuffer, m_CameraDepthStencilBuffer);
}
m_ForwardAndForwardOnlyPassNames[0] = m_ForwardOnlyPassNames[0] =
HDShaderPassNames.s_ForwardOnlyName;
m_ForwardAndForwardOnlyPassNames[1] = HDShaderPassNames.s_ForwardName;
var passNames = hdCamera.frameSettings.enableForwardRenderingOnly
? m_ForwardAndForwardOnlyPassNames
: m_ForwardOnlyPassNames;

// This is use to Display legacy shader with an error shader
[Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")]
void RenderForwardError(CullResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd, ForwardPass pass)
void RenderForwardError(CullResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd)
if (pass == ForwardPass.Opaque)
{
RenderOpaqueRenderList(cullResults, hdCamera, renderContext, cmd, m_ForwardErrorPassNames, 0, null, null, m_ErrorMaterial);
}
else
{
RenderTransparentRenderList(cullResults, hdCamera, renderContext, cmd, m_ForwardErrorPassNames, 0, pass == ForwardPass.PreRefraction ? HDRenderQueue.k_RenderQueue_PreRefraction : HDRenderQueue.k_RenderQueue_Transparent, null, m_ErrorMaterial);
}
RenderOpaqueRenderList(cullResults, hdCamera, renderContext, cmd, m_ForwardErrorPassNames, 0, RenderQueueRange.all, null, m_ErrorMaterial);
}
}

11
com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalProjectorComponent.cs


}
if (m_Handle != null)
{
m_Handle = null;
}
Vector4 uvScaleBias = new Vector4(m_UVScale.x, m_UVScale.y, m_UVBias.x, m_UVBias.y);
m_Handle = DecalSystem.instance.AddDecal(transform, m_DrawDistance, m_FadeScale, uvScaleBias, m_Material);
}

DecalSystem.instance.RemoveDecal(m_Handle);
m_Handle = null;
if (m_Handle != null)
{
DecalSystem.instance.RemoveDecal(m_Handle);
m_Handle = null;
}
}
// Declare the method signature of the delegate to call.

19
com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalSystem.cs


public class DecalSystem
{
public const int kInvalidIndex = -1;
public const int kNullMaterialIndex = int.MaxValue;
public class DecalHandle
{
public DecalHandle(int index, int materialID)

{
public void InitializeMaterialValues()
{
if (m_Material == null)
return;
m_Diffuse.m_Texture = m_Material.GetTexture("_BaseColorMap");
m_Normal.m_Texture = m_Material.GetTexture("_NormalMap");
m_Mask.m_Texture = m_Material.GetTexture("_MaskMap");

public DecalSet(Material material)
{
m_Material = material;
m_Material = material;
InitializeMaterialValues();
}

public void UpdateCachedData(Transform transform, float drawDistance, float fadeScale, Vector4 uvScaleBias, DecalHandle handle)
{
if (m_Material == null)
return;
int index = handle.m_Index;
m_CachedDecalToWorld[index] = transform.localToWorldMatrix;

public void BeginCull()
{
if (m_Material == null)
return;
if (m_CullingGroup != null)
{
Debug.LogError("Begin/EndCull() called out of sequence for decal projectors.");

public int QueryCullResults()
{
if (m_Material == null)
return 0;
m_NumResults = m_CullingGroup.QueryIndices(true, m_ResultIndices, 0);
return m_NumResults;
}

public void CreateDrawData()
{
if (m_Material == null)
return;
if (m_NumResults == 0)
return;
// only add if anything in this decal set is visible.

public void EndCull()
{
if (m_Material == null)
return;
if (m_CullingGroup == null)
{
Debug.LogError("Begin/EndCull() called out of sequence for decal projectors.");

public void RenderIntoDBuffer(CommandBuffer cmd)
{
if (m_Material == null)
return;
if (m_NumResults == 0)
return;
int batchIndex = 0;

public DecalHandle AddDecal(Transform transform, float drawDistance, float fadeScale, Vector4 uvScaleBias, Material material)
{
DecalSet decalSet = null;
int key = material.GetInstanceID();
int key = material != null ? material.GetInstanceID() : kNullMaterialIndex;
if (!m_DecalSets.TryGetValue(key, out decalSet))
{
decalSet = new DecalSet(material);

8
com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors.meta


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

8
com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors.meta


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

8
com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline.meta


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

8
com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipelineResources.meta


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

8
com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders.meta


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

8
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings.meta


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

316
com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs


using System;
using System.IO;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;
using UnityEngine.SceneManagement;
using UnityEditor.SceneManagement;
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
using UnityObject = UnityEngine.Object;
public class HDRenderPipelineMenuItems
{
// Function used only to check performance of data with and without tessellation
[MenuItem("Internal/HDRenderPipeline/Test/Remove tessellation materials (not reversible)")]
static void RemoveTessellationMaterials()
{
var materials = Resources.FindObjectsOfTypeAll<Material>();
var litShader = Shader.Find("HDRenderPipeline/Lit");
var layeredLitShader = Shader.Find("HDRenderPipeline/LayeredLit");
foreach (var mat in materials)
{
if (mat.shader.name == "HDRenderPipeline/LitTessellation")
{
mat.shader = litShader;
// We remove all keyword already present
CoreEditorUtils.RemoveMaterialKeywords(mat);
LitGUI.SetupMaterialKeywordsAndPass(mat);
EditorUtility.SetDirty(mat);
}
else if (mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
{
mat.shader = layeredLitShader;
// We remove all keyword already present
CoreEditorUtils.RemoveMaterialKeywords(mat);
LayeredLitGUI.SetupMaterialKeywordsAndPass(mat);
EditorUtility.SetDirty(mat);
}
}
}
[MenuItem("Edit/Render Pipeline/Export Sky to Image", priority = CoreUtils.editMenuPriority3)]
static void ExportSkyToImage()
{
var renderpipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline;
if (renderpipeline == null)
{
Debug.LogError("HDRenderPipeline is not instantiated.");
return;
}
var result = renderpipeline.ExportSkyToTexture();
if (result == null)
return;
// Encode texture into PNG
byte[] bytes = result.EncodeToEXR(Texture2D.EXRFlags.CompressZIP);
UnityObject.DestroyImmediate(result);
string assetPath = EditorUtility.SaveFilePanel("Export Sky", "Assets", "SkyExport", "exr");
if (!string.IsNullOrEmpty(assetPath))
{
File.WriteAllBytes(assetPath, bytes);
AssetDatabase.Refresh();
}
}
[MenuItem("GameObject/Rendering/Scene Settings", priority = CoreUtils.gameObjectMenuPriority)]
static void CreateSceneSettingsGameObject(MenuCommand menuCommand)
{
var parent = menuCommand.context as GameObject;
var sceneSettings = CoreEditorUtils.CreateGameObject(parent, "Scene Settings");
GameObjectUtility.SetParentAndAlign(sceneSettings, menuCommand.context as GameObject);
Undo.RegisterCreatedObjectUndo(sceneSettings, "Create " + sceneSettings.name);
Selection.activeObject = sceneSettings;
var profile = VolumeProfileFactory.CreateVolumeProfile(sceneSettings.scene, "Scene Settings");
VolumeProfileFactory.CreateVolumeComponent<HDShadowSettings>(profile, true, false);
var visualEnv = VolumeProfileFactory.CreateVolumeComponent<VisualEnvironment>(profile, true, false);
visualEnv.skyType.value = SkySettings.GetUniqueID<ProceduralSky>();
visualEnv.fogType.value = FogType.Exponential;
VolumeProfileFactory.CreateVolumeComponent<ProceduralSky>(profile, true, false);
VolumeProfileFactory.CreateVolumeComponent<ExponentialFog>(profile, true, true);
var volume = sceneSettings.AddComponent<Volume>();
volume.isGlobal = true;
volume.sharedProfile = profile;
var bakingSky = sceneSettings.AddComponent<BakingSky>();
bakingSky.profile = volume.sharedProfile;
bakingSky.bakingSkyUniqueID = SkySettings.GetUniqueID<ProceduralSky>();
}
class DoCreateNewAsset<TAssetType> : ProjectWindowCallback.EndNameEditAction where TAssetType : ScriptableObject
{
public override void Action(int instanceId, string pathName, string resourceFile)
{
var newAsset = CreateInstance<TAssetType>();
newAsset.name = Path.GetFileName(pathName);
AssetDatabase.CreateAsset(newAsset, pathName);
ProjectWindowUtil.ShowCreatedAsset(newAsset);
}
}
class DoCreateNewAssetDiffusionProfileSettings : DoCreateNewAsset<DiffusionProfileSettings> { }
[MenuItem("Assets/Create/Rendering/Diffusion profile Settings", priority = CoreUtils.assetCreateMenuPriority2)]
static void MenuCreateDiffusionProfile()
{
var icon = EditorGUIUtility.FindTexture("ScriptableObject Icon");
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance<DoCreateNewAssetDiffusionProfileSettings>(), "New Diffusion Profile Settings.asset", icon, null);
}
[MenuItem("Internal/HDRenderPipeline/Add \"Additional Light-shadow Data\" (if not present)")]
static void AddAdditionalLightData()
{
var lights = UnityObject.FindObjectsOfType(typeof(Light)) as Light[];
foreach (var light in lights)
{
// Do not add a component if there already is one.
if (light.GetComponent<HDAdditionalLightData>() == null)
light.gameObject.AddComponent<HDAdditionalLightData>();
if (light.GetComponent<AdditionalShadowData>() == null)
{
AdditionalShadowData shadowData = light.gameObject.AddComponent<AdditionalShadowData>();
HDAdditionalShadowData.InitDefaultHDAdditionalShadowData(shadowData);
}
}
}
[MenuItem("Internal/HDRenderPipeline/Add \"Additional Camera Data\" (if not present)")]
static void AddAdditionalCameraData()
{
var cameras = UnityObject.FindObjectsOfType(typeof(Camera)) as Camera[];
foreach (var camera in cameras)
{
// Do not add a component if there already is one.
if (camera.GetComponent<HDAdditionalCameraData>() == null)
camera.gameObject.AddComponent<HDAdditionalCameraData>();
}
}
// This script is a helper for the artists to re-synchronize all layered materials
[MenuItem("Internal/HDRenderPipeline/Synchronize all Layered materials")]
static void SynchronizeAllLayeredMaterial()
{
var materials = Resources.FindObjectsOfTypeAll<Material>();
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
foreach (var mat in materials)
{
if (mat.shader.name == "HDRenderPipeline/LayeredLit" || mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
{
CoreUtils.CheckOutFile(VSCEnabled, mat);
LayeredLitGUI.SynchronizeAllLayers(mat);
EditorUtility.SetDirty(mat);
}
}
}
// The goal of this script is to help maintenance of data that have already been produced but need to update to the latest shader code change.
// In case the shader code have change and the inspector have been update with new kind of keywords we need to regenerate the set of keywords use by the material.
// This script will remove all keyword of a material and trigger the inspector that will re-setup all the used keywords.
// It require that the inspector of the material have a static function call that update all keyword based on material properties.
[MenuItem("Edit/Render Pipeline/Reset All Loaded High Definition Materials Keywords", priority = CoreUtils.editMenuPriority3)]
static void ResetAllMaterialKeywords()
{
try
{
ResetAllLoadedMaterialKeywords(string.Empty, 1, 0);
}
finally
{
EditorUtility.ClearProgressBar();
}
}
// Don't expose, ResetAllMaterialKeywordsInProjectAndScenes include it anyway
//[MenuItem("Edit/Render Pipeline/Reset All Material Asset's Keywords (Materials in Project)", priority = CoreUtils.editMenuPriority3)]
static void ResetAllMaterialAssetsKeywords()
{
try
{
ResetAllMaterialAssetsKeywords(1, 0);
}
finally
{
EditorUtility.ClearProgressBar();
}
}
[MenuItem("Edit/Render Pipeline/Reset All Project and Scene High Definition Materials Keywords", priority = CoreUtils.editMenuPriority3)]
static void ResetAllMaterialKeywordsInProjectAndScenes()
{
var openedScenes = new string[EditorSceneManager.loadedSceneCount];
for (var i = 0; i < openedScenes.Length; ++i)
openedScenes[i] = SceneManager.GetSceneAt(i).path;
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
try
{
var scenes = AssetDatabase.FindAssets("t:Scene");
var scale = 1f / Mathf.Max(1, scenes.Length);
for (var i = 0; i < scenes.Length; ++i)
{
var scenePath = AssetDatabase.GUIDToAssetPath(scenes[i]);
var sceneAsset = AssetDatabase.LoadAssetAtPath<SceneAsset>(scenePath);
CoreUtils.CheckOutFile(VSCEnabled, sceneAsset);
EditorSceneManager.OpenScene(scenePath);
var sceneName = Path.GetFileNameWithoutExtension(scenePath);
var description = string.Format("{0} {1}/{2} - ", sceneName, i + 1, scenes.Length);
if (ResetAllLoadedMaterialKeywords(description, scale, scale * i))
{
EditorSceneManager.SaveScene(EditorSceneManager.GetActiveScene());
}
}
ResetAllMaterialAssetsKeywords(scale, scale * (scenes.Length - 1));
}
finally
{
EditorUtility.ClearProgressBar();
if (openedScenes.Length > 0)
{
EditorSceneManager.OpenScene(openedScenes[0]);
for (var i = 1; i < openedScenes.Length; i++)
EditorSceneManager.OpenScene(openedScenes[i], OpenSceneMode.Additive);
}
}
}
static void ResetAllMaterialAssetsKeywords(float progressScale, float progressOffset)
{
var matIds = AssetDatabase.FindAssets("t:Material");
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
for (int i = 0, length = matIds.Length; i < length; i++)
{
var path = AssetDatabase.GUIDToAssetPath(matIds[i]);
var mat = AssetDatabase.LoadAssetAtPath<Material>(path);
EditorUtility.DisplayProgressBar(
"Setup material asset's Keywords...",
string.Format("{0} / {1} materials cleaned.", i, length),
(i / (float)(length - 1)) * progressScale + progressOffset);
CoreUtils.CheckOutFile(VSCEnabled, mat);
var h = Debug.unityLogger.logHandler;
Debug.unityLogger.logHandler = new UnityContextualLogHandler(mat);
HDEditorUtils.ResetMaterialKeywords(mat);
Debug.unityLogger.logHandler = h;
}
}
static bool ResetAllLoadedMaterialKeywords(string descriptionPrefix, float progressScale, float progressOffset)
{
var materials = Resources.FindObjectsOfTypeAll<Material>();
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
bool anyMaterialDirty = false; // Will be true if any material is dirty.
for (int i = 0, length = materials.Length; i < length; i++)
{
EditorUtility.DisplayProgressBar(
"Setup materials Keywords...",
string.Format("{0}{1} / {2} materials cleaned.", descriptionPrefix, i, length),
(i / (float)(length - 1)) * progressScale + progressOffset);
CoreUtils.CheckOutFile(VSCEnabled, materials[i]);
if (HDEditorUtils.ResetMaterialKeywords(materials[i]))
{
anyMaterialDirty = true;
}
}
return anyMaterialDirty;
}
class UnityContextualLogHandler : ILogHandler
{
UnityObject m_Context;
static readonly ILogHandler k_DefaultLogHandler = Debug.unityLogger.logHandler;
public UnityContextualLogHandler(UnityObject context)
{
m_Context = context;
}
public void LogFormat(LogType logType, UnityObject context, string format, params object[] args)
{
k_DefaultLogHandler.LogFormat(LogType.Log, m_Context, "Context: {0} ({1})", m_Context, AssetDatabase.GetAssetPath(m_Context));
k_DefaultLogHandler.LogFormat(logType, context, format, args);
}
public void LogException(Exception exception, UnityObject context)
{
k_DefaultLogHandler.LogFormat(LogType.Log, m_Context, "Context: {0} ({1})", m_Context, AssetDatabase.GetAssetPath(m_Context));
k_DefaultLogHandler.LogException(exception, context);
}
}
}
}

8
com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/Settings.meta


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

75
com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/HDRPVersion.cs


using System;
using System.IO;
using UnityEngine;
using UnityEditor;
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
[InitializeOnLoad]
public class HDRPVersion
{
static public float hdrpVersion = 1.0f;
static public float GetCurrentHDRPProjectVersion()
{
string[] version = new string[1];
version[0] = "0.9"; // Note: When we don't know what a project is, assume worst case
try
{
version = File.ReadAllLines("ProjectSettings/HDRPProjectVersion.txt");
}
catch
{
Debug.LogWarning("Unable to read from ProjectSettings/HDRPProjectVersion.txt - Assign default version value");
}
return float.Parse(version[0]);
}
static public void WriteCurrentHDRPProjectVersion()
{
string[] newVersion = new string[1];
newVersion[0] = hdrpVersion.ToString();
try
{
File.WriteAllLines("ProjectSettings/HDRPProjectVersion.txt", newVersion);
}
catch
{
Debug.LogWarning("Unable to write ProjectSettings/HDRPProjectVersion.txt");
}
}
static HDRPVersion()
{
// Compare project version with current version - Trigger an upgrade if user ask for it
if (GetCurrentHDRPProjectVersion() < hdrpVersion)
{
if (EditorUtility.DisplayDialog("A newer version of HDRP has been detected",
"Do you want to upgrade your materials to newer version?\n You can also upgrade manually materials in 'Edit -> Render Pipeline' submenu", "Yes", "No"))
{
UpgradeMenuItems.UpdateMaterialToNewerVersion();
}
}
}
}
public class FileModificationWarning : UnityEditor.AssetModificationProcessor
{
static string[] OnWillSaveAssets(string[] paths)
{
foreach (string path in paths)
{
// Detect when we save project and write our HDRP version at this time.
if (path == "ProjectSettings/ProjectSettings.asset")
{
// Update current project version with HDRP version
HDRPVersion.WriteCurrentHDRPProjectVersion();
}
}
return paths;
}
}
}

11
com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/HDRPVersion.cs.meta


fileFormatVersion: 2
guid: 15eef13f7728c874da10e59d60aac6fa
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

351
com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/UpgradeMenuItem.cs


using System;
using System.IO;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;
using UnityEngine.SceneManagement;
using UnityEditor.SceneManagement;
using System.Linq;
using System.Collections.Generic;
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
public class UpgradeMenuItems
{
//[MenuItem("Internal/HDRenderPipeline/Upgrade Scene Light Intensity to physical light unit", priority = CoreUtils.editMenuPriority2)]
static void UpgradeLightsPLU()
{
Light[] lights = Resources.FindObjectsOfTypeAll<Light>();
foreach (var l in lights)
{
var add = l.GetComponent<HDAdditionalLightData>();
if (add == null)
{
continue;
}
// We only need to update the new intensity parameters on additional data, no need to change intensity
if (add.lightTypeExtent == LightTypeExtent.Punctual)
{
switch (l.type)
{
case LightType.Point:
add.punctualIntensity = l.intensity / LightUtils.ConvertPointLightIntensity(1.0f);
break;
case LightType.Spot:
add.punctualIntensity = l.intensity / LightUtils.ConvertPointLightIntensity(1.0f);
break;
case LightType.Directional:
add.directionalIntensity = l.intensity;
break;
}
}
else if (add.lightTypeExtent == LightTypeExtent.Rectangle)
{
add.areaIntensity = l.intensity / LightUtils.ConvertRectLightIntensity(1.0f, add.shapeWidth, add.shapeHeight);
}
else if (add.lightTypeExtent == LightTypeExtent.Line)
{
add.areaIntensity = l.intensity / LightUtils.CalculateLineLightIntensity(1.0f, add.shapeWidth);
}
}
var scene = SceneManager.GetActiveScene();
EditorSceneManager.MarkSceneDirty(scene);
}
//[MenuItem("Internal/HDRenderPipeline/Update/Update material for subsurface")]
static void UpdateMaterialForSubsurface()
{
try
{
var matIds = AssetDatabase.FindAssets("t:Material");
for (int i = 0, length = matIds.Length; i < length; i++)
{
var path = AssetDatabase.GUIDToAssetPath(matIds[i]);
var mat = AssetDatabase.LoadAssetAtPath<Material>(path);
EditorUtility.DisplayProgressBar(
"Setup materials Keywords...",
string.Format("{0} / {1} materials subsurface updated.", i, length),
i / (float)(length - 1));
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
if (mat.shader.name == "HDRenderPipeline/LitTessellation" ||
mat.shader.name == "HDRenderPipeline/Lit" ||
mat.shader.name == "HDRenderPipeline/LayeredLit" ||
mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
{
float materialID = mat.GetInt("_MaterialID");
if (materialID != 0.0)
continue;
if (mat.HasProperty("_SSSAndTransmissionType"))
{
CoreUtils.CheckOutFile(VSCEnabled, mat);
int materialSSSAndTransmissionID = mat.GetInt("_SSSAndTransmissionType");
// Both;, SSS only, Transmission only
if (materialSSSAndTransmissionID == 2.0)
{
mat.SetInt("_MaterialID", 5);
}
else
{
if (materialSSSAndTransmissionID == 0.0)
mat.SetFloat("_TransmissionEnable", 1.0f);
else
mat.SetFloat("_TransmissionEnable", 0.0f);
}
EditorUtility.SetDirty(mat);
}
}
}
}
finally
{
EditorUtility.ClearProgressBar();
}
}
//[MenuItem("Internal/HDRenderPipeline/Update/Update Height Maps parametrization")]
static void UpdateHeightMapParametrization()
{
try
{
var matIds = AssetDatabase.FindAssets("t:Material");
for (int i = 0, length = matIds.Length; i < length; i++)
{
var path = AssetDatabase.GUIDToAssetPath(matIds[i]);
var mat = AssetDatabase.LoadAssetAtPath<Material>(path);
EditorUtility.DisplayProgressBar(
"Updating Materials...",
string.Format("{0} / {1} materials updated.", i, length),
i / (float)(length - 1));
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
if (mat.shader.name == "HDRenderPipeline/LitTessellation" ||
mat.shader.name == "HDRenderPipeline/Lit")
{
// Need only test one of the new properties
if (mat.HasProperty("_HeightPoMAmplitude"))
{
CoreUtils.CheckOutFile(VSCEnabled, mat);
float valueMax = mat.GetFloat("_HeightMax");
float valueMin = mat.GetFloat("_HeightMin");
float center = mat.GetFloat("_HeightCenter");
float amplitude = valueMax - valueMin;
mat.SetInt("_HeightMapParametrization", 1);
mat.SetFloat("_HeightPoMAmplitude", amplitude);
mat.SetFloat("_HeightTessAmplitude", amplitude);
mat.SetFloat("_HeightOffset", 0.0f);
mat.SetFloat("_HeightTessCenter", center);
BaseLitGUI.DisplacementMode displaceMode = (BaseLitGUI.DisplacementMode)mat.GetInt("_DisplacementMode");
if (displaceMode == BaseLitGUI.DisplacementMode.Pixel)
{
mat.SetFloat("_HeightCenter", 1.0f); // With PoM this is always 1.0f. We set it here to avoid having to open the UI to update it.
}
EditorUtility.SetDirty(mat);
}
}
else if (mat.shader.name == "HDRenderPipeline/LayeredLit" ||
mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
{
int numLayer = (int)mat.GetFloat("_LayerCount");
if (mat.HasProperty("_HeightPoMAmplitude0"))
{
CoreUtils.CheckOutFile(VSCEnabled, mat);
for (int x = 0; x < numLayer; ++x)
{
float valueMax = mat.GetFloat("_HeightMax" + x);
float valueMin = mat.GetFloat("_HeightMin" + x);
float center = mat.GetFloat("_HeightCenter" + x);
float amplitude = valueMax - valueMin;
mat.SetInt("_HeightMapParametrization" + x, 1);
mat.SetFloat("_HeightPoMAmplitude" + x, amplitude);
mat.SetFloat("_HeightTessAmplitude" + x, amplitude);
mat.SetFloat("_HeightOffset" + x, 0.0f);
mat.SetFloat("_HeightTessCenter" + x, center);
BaseLitGUI.DisplacementMode displaceMode = (BaseLitGUI.DisplacementMode)mat.GetInt("_DisplacementMode");
if (displaceMode == BaseLitGUI.DisplacementMode.Pixel)
{
mat.SetFloat("_HeightCenter" + x, 1.0f); // With PoM this is always 1.0f. We set it here to avoid having to open the UI to update it.
}
}
EditorUtility.SetDirty(mat);
}
}
}
}
finally
{
EditorUtility.ClearProgressBar();
}
}
// Update EmissiveColor after we remove EmissiveIntensity from all shaders in 2018.2
// Now EmissiveColor is HDR and it must be update to the value new EmissiveColor = old EmissiveColor * EmissiveIntensity
static bool UpdateMaterial_EmissiveColor(string path, Material mat)
{
// Find the missing property in the file and update EmissiveColor
string[] readText = File.ReadAllLines(path);
foreach (string line in readText)
{
if (line.Contains("_EmissiveIntensity:"))
{
int startPos = line.IndexOf(":") + 1;
string sub = line.Substring(startPos);
float emissiveIntensity = float.Parse(sub);
Color emissiveColor = Color.black;
if (mat.HasProperty("_EmissiveColor"))
{
emissiveColor = mat.GetColor("_EmissiveColor");
}
emissiveColor *= emissiveIntensity;
emissiveColor.a = 1.0f;
mat.SetColor("_EmissiveColor", emissiveColor);
// Also fix EmissionColor if needed (Allow to let HD handle GI, if black GI is disabled by legacy)
mat.SetColor("_EmissionColor", Color.white);
return true;
}
}
return false;
}
static void UpdateMaterialFile_EmissiveColor(string path)
{
string[] readText = File.ReadAllLines(path);
foreach (string line in readText)
{
if (line.Contains("_EmissiveIntensity:"))
{
// Remove emissive intensity line
string[] writeText = readText.Where(l => l != line).ToArray();
File.WriteAllLines(path, writeText);
return;
}
}
return;
}
delegate bool UpdateMaterial(string path, Material mat);
delegate void UpdateMaterialFile(string path);
static void UpdateMaterialToNewerVersion(string caption, UpdateMaterial updateMaterial, UpdateMaterialFile updateMaterialFile = null)
{
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
var matIds = AssetDatabase.FindAssets("t:Material");
List<string> materialFiles = new List<string>(); // Contain the list dirty files
try
{
for (int i = 0, length = matIds.Length; i < length; i++)
{
var path = AssetDatabase.GUIDToAssetPath(matIds[i]);
var mat = AssetDatabase.LoadAssetAtPath<Material>(path);
EditorUtility.DisplayProgressBar(
"Update material to new version " + caption + "...",
string.Format("{0} / {1} materials updated.", i, length),
i / (float)(length - 1));
if (mat.shader.name == "HDRenderPipeline/LitTessellation" ||
mat.shader.name == "HDRenderPipeline/Lit" ||
mat.shader.name == "HDRenderPipeline/LayeredLit" ||
mat.shader.name == "HDRenderPipeline/LayeredLitTessellation" ||
mat.shader.name == "HDRenderPipeline/StackLit" ||
mat.shader.name == "HDRenderPipeline/Unlit"
)
{
// Need to be processed in order - All function here should be re-entrant (i.e after upgrade it can be recall)
bool dirty = updateMaterial(path, mat);
if (dirty)
{
// Checkout the file and tag it as dirty
CoreUtils.CheckOutFile(VSCEnabled, mat);
EditorUtility.SetDirty(mat);
materialFiles.Add(path);
}
}
}
}
finally
{
EditorUtility.ClearProgressBar();
// Save all dirty assets
AssetDatabase.SaveAssets();
}
if (updateMaterialFile == null)
return;
// Now that all the asset have been modified and save, we can safely update the .mat file and remove removed property
try
{
for (int i = 0, length = materialFiles.Count; i < length; i++)
{
string path = materialFiles[i];
EditorUtility.DisplayProgressBar(
"Update .mat files...",
string.Format("{0} / {1} materials .mat file updated.", i, length),
i / (float)(length - 1));
// Note: The file is supposed to be checkout by the previous loop
updateMaterialFile(path);
}
}
finally
{
EditorUtility.ClearProgressBar();
// No need to save in this case
}
}
[MenuItem("Edit/Render Pipeline/Single step upgrade script/Upgrade all Materials EmissionColor", priority = CoreUtils.editMenuPriority3)]
static public void UpdateMaterialToNewerVersionEmissiveColor()
{
UpdateMaterialToNewerVersion("(EmissiveColor)", UpdateMaterial_EmissiveColor, UpdateMaterialFile_EmissiveColor);
}
[MenuItem("Edit/Render Pipeline/Upgrade all Materials to latest version", priority = CoreUtils.editMenuPriority3)]
static public void UpdateMaterialToNewerVersion()
{
// Add here all the material upgrade function supported in this version
// Caution: All the functions here MUST be re-entrant (call multiple time) without failing.
float currentVersion = HDRPVersion.GetCurrentHDRPProjectVersion();
if (currentVersion < 1.0)
{
// Appear in hdrp version 1.0
UpdateMaterialToNewerVersion("(EmissiveColor)", UpdateMaterial_EmissiveColor, UpdateMaterialFile_EmissiveColor);
}
}
}
}

11
com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/UpgradeMenuItem.cs.meta


fileFormatVersion: 2
guid: 9ba0cef4d0966574ab013f1cb2972ba3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
com.unity.render-pipelines.high-definition/HDRP/Editor/Decal.meta


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

8
com.unity.render-pipelines.high-definition/HDRP/Editor/EditorRenderPipelineResources.meta


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

8
com.unity.render-pipelines.high-definition/HDRP/Editor/RenderLoopSettings.meta


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

625
com.unity.render-pipelines.high-definition/HDRP/Editor/HDRenderPipelineMenuItems.cs


using System;
using System.IO;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;
using UnityEngine.SceneManagement;
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
using UnityObject = UnityEngine.Object;
public class HDRenderPipelineMenuItems
{
[MenuItem("Internal/HDRenderPipeline/Upgrade Scene Light Intensity to physical light unit", priority = CoreUtils.editMenuPriority2)]
static void UpgradeLightsPLU()
{
Light[] lights = Resources.FindObjectsOfTypeAll<Light>();
foreach (var l in lights)
{
var add = l.GetComponent<HDAdditionalLightData>();
if (add == null)
{
continue;
}
// We only need to update the new intensity parameters on additional data, no need to change intensity
if (add.lightTypeExtent == LightTypeExtent.Punctual)
{
switch (l.type)
{
case LightType.Point:
add.punctualIntensity = l.intensity / LightUtils.ConvertPointLightIntensity(1.0f);
break;
case LightType.Spot:
add.punctualIntensity = l.intensity / LightUtils.ConvertPointLightIntensity(1.0f);
break;
case LightType.Directional:
add.directionalIntensity = l.intensity;
break;
}
}
else if (add.lightTypeExtent == LightTypeExtent.Rectangle)
{
add.areaIntensity = l.intensity / LightUtils.ConvertRectLightIntensity(1.0f, add.shapeWidth, add.shapeHeight);
}
else if (add.lightTypeExtent == LightTypeExtent.Line)
{
add.areaIntensity = l.intensity / LightUtils.CalculateLineLightIntensity(1.0f, add.shapeWidth);
}
}
var scene = SceneManager.GetActiveScene();
EditorSceneManager.MarkSceneDirty(scene);
}
[MenuItem("Internal/HDRenderPipeline/Add \"Additional Light-shadow Data\" (if not present)")]
static void AddAdditionalLightData()
{
var lights = UnityObject.FindObjectsOfType(typeof(Light)) as Light[];
foreach (var light in lights)
{
// Do not add a component if there already is one.
if (light.GetComponent<HDAdditionalLightData>() == null)
light.gameObject.AddComponent<HDAdditionalLightData>();
if (light.GetComponent<AdditionalShadowData>() == null)
{
AdditionalShadowData shadowData = light.gameObject.AddComponent<AdditionalShadowData>();
HDAdditionalShadowData.InitDefaultHDAdditionalShadowData(shadowData);
}
}
}
[MenuItem("Internal/HDRenderPipeline/Add \"Additional Camera Data\" (if not present)")]
static void AddAdditionalCameraData()
{
var cameras = UnityObject.FindObjectsOfType(typeof(Camera)) as Camera[];
foreach (var camera in cameras)
{
// Do not add a component if there already is one.
if (camera.GetComponent<HDAdditionalCameraData>() == null)
camera.gameObject.AddComponent<HDAdditionalCameraData>();
}
}
static void CheckOutFile(bool VSCEnabled, UnityObject mat)
{
if (VSCEnabled)
{
UnityEditor.VersionControl.Task task = UnityEditor.VersionControl.Provider.Checkout(mat, UnityEditor.VersionControl.CheckoutMode.Both);
if (!task.success)
{
Debug.Log(task.text + " " + task.resultCode);
}
}
}
// This script is a helper for the artists to re-synchronize all layered materials
[MenuItem("Internal/HDRenderPipeline/Synchronize all Layered materials")]
static void SynchronizeAllLayeredMaterial()
{
var materials = Resources.FindObjectsOfTypeAll<Material>();
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
foreach (var mat in materials)
{
if (mat.shader.name == "HDRenderPipeline/LayeredLit" || mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
{
CheckOutFile(VSCEnabled, mat);
LayeredLitGUI.SynchronizeAllLayers(mat);
EditorUtility.SetDirty(mat);
}
}
}
// The goal of this script is to help maintenance of data that have already been produced but need to update to the latest shader code change.
// In case the shader code have change and the inspector have been update with new kind of keywords we need to regenerate the set of keywords use by the material.
// This script will remove all keyword of a material and trigger the inspector that will re-setup all the used keywords.
// It require that the inspector of the material have a static function call that update all keyword based on material properties.
[MenuItem("Edit/Render Pipeline/Reset All Loaded High Definition Materials Keywords", priority = CoreUtils.editMenuPriority3)]
static void ResetAllMaterialKeywords()
{
try
{
ResetAllLoadedMaterialKeywords(string.Empty, 1, 0);
}
finally
{
EditorUtility.ClearProgressBar();
}
}
// Don't expose, ResetAllMaterialKeywordsInProjectAndScenes include it anyway
//[MenuItem("Edit/Render Pipeline/Reset All Material Asset's Keywords (Materials in Project)", priority = CoreUtils.editMenuPriority3)]
static void ResetAllMaterialAssetsKeywords()
{
try
{
ResetAllMaterialAssetsKeywords(1, 0);
}
finally
{
EditorUtility.ClearProgressBar();
}
}
[MenuItem("Edit/Render Pipeline/Reset All Project and Scene High Definition Materials Keywords", priority = CoreUtils.editMenuPriority3)]
static void ResetAllMaterialKeywordsInProjectAndScenes()
{
var openedScenes = new string[EditorSceneManager.loadedSceneCount];
for (var i = 0; i < openedScenes.Length; ++i)
openedScenes[i] = SceneManager.GetSceneAt(i).path;
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
try
{
var scenes = AssetDatabase.FindAssets("t:Scene");
var scale = 1f / Mathf.Max(1, scenes.Length);
for (var i = 0; i < scenes.Length; ++i)
{
var scenePath = AssetDatabase.GUIDToAssetPath(scenes[i]);
var sceneAsset = AssetDatabase.LoadAssetAtPath<SceneAsset>(scenePath);
CheckOutFile(VSCEnabled, sceneAsset);
EditorSceneManager.OpenScene(scenePath);
var sceneName = Path.GetFileNameWithoutExtension(scenePath);
var description = string.Format("{0} {1}/{2} - ", sceneName, i + 1, scenes.Length);
if (ResetAllLoadedMaterialKeywords(description, scale, scale * i))
{
EditorSceneManager.SaveScene(EditorSceneManager.GetActiveScene());
}
}
ResetAllMaterialAssetsKeywords(scale, scale * (scenes.Length - 1));
}
finally
{
EditorUtility.ClearProgressBar();
if (openedScenes.Length > 0)
{
EditorSceneManager.OpenScene(openedScenes[0]);
for (var i = 1; i < openedScenes.Length; i++)
EditorSceneManager.OpenScene(openedScenes[i], OpenSceneMode.Additive);
}
}
}
[MenuItem("Internal/HDRenderPipeline/Update/Update diffusion profile")]
static void UpdateDiffusionProfile()
{
var matIds = AssetDatabase.FindAssets("t:DiffusionProfileSettings");
for (int i = 0, length = matIds.Length; i < length; i++)
{
var path = AssetDatabase.GUIDToAssetPath(matIds[i]);
var diffusionProfileSettings = AssetDatabase.LoadAssetAtPath<DiffusionProfileSettings>(path);
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
CheckOutFile(VSCEnabled, diffusionProfileSettings);
var profiles = diffusionProfileSettings.profiles;
for (int j = 0; j < profiles.Length; j++)
{
if ((uint)profiles[j].transmissionMode == 2)
{
profiles[j].transmissionMode = (DiffusionProfile.TransmissionMode) 0;
}
}
EditorUtility.SetDirty(diffusionProfileSettings);
}
}
[MenuItem("Internal/HDRenderPipeline/Update/Update material for clear coat")]
static void UpdateMaterialForClearCoat()
{
try
{
var matIds = AssetDatabase.FindAssets("t:Material");
for (int i = 0, length = matIds.Length; i < length; i++)
{
var path = AssetDatabase.GUIDToAssetPath(matIds[i]);
var mat = AssetDatabase.LoadAssetAtPath<Material>(path);
EditorUtility.DisplayProgressBar(
"Setup materials Keywords...",
string.Format("{0} / {1} materials clearcoat updated.", i, length),
i / (float)(length - 1));
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
if (mat.shader.name == "HDRenderPipeline/LitTessellation" ||
mat.shader.name == "HDRenderPipeline/Lit")
{
if (mat.HasProperty("_CoatMask"))
{
// 3 is Old value for clear coat
float materialID = mat.GetInt("_MaterialID");
if (materialID == 3.0)
continue;
CheckOutFile(VSCEnabled, mat);
mat.SetInt("_CoatMask", 0);
EditorUtility.SetDirty(mat);
}
}
else if (mat.shader.name == "HDRenderPipeline/LayeredLit" ||
mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
{
/*
bool hasSubsurfaceProfile = false;
int numLayer = (int)mat.GetFloat("_LayerCount");
for (int x = 0; x < numLayer; ++x)
{
if (mat.HasProperty("_SubsurfaceProfile" + x))
{
hasSubsurfaceProfile = true;
}
}
if (hasSubsurfaceProfile)
{
CheckOutFile(VSCEnabled, mat);
for (int x = 0; x < numLayer; ++x)
{
if (mat.HasProperty("_SubsurfaceProfile" + x))
{
CheckOutFile(VSCEnabled, mat);
//float value = mat.GetInt("_DiffusionProfile" + x);
//mat.SetInt("_DiffusionProfile" + x, 0);
EditorUtility.SetDirty(mat);
}
}
EditorUtility.SetDirty(mat);
}
*/
}
}
}
finally
{
EditorUtility.ClearProgressBar();
}
}
[MenuItem("Internal/HDRenderPipeline/Update/Update material for subsurface")]
static void UpdateMaterialForSubsurface()
{
try
{
var matIds = AssetDatabase.FindAssets("t:Material");
for (int i = 0, length = matIds.Length; i < length; i++)
{
var path = AssetDatabase.GUIDToAssetPath(matIds[i]);
var mat = AssetDatabase.LoadAssetAtPath<Material>(path);
EditorUtility.DisplayProgressBar(
"Setup materials Keywords...",
string.Format("{0} / {1} materials subsurface updated.", i, length),
i / (float)(length - 1));
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
if (mat.shader.name == "HDRenderPipeline/LitTessellation" ||
mat.shader.name == "HDRenderPipeline/Lit" ||
mat.shader.name == "HDRenderPipeline/LayeredLit" ||
mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
{
float materialID = mat.GetInt("_MaterialID");
if (materialID != 0.0)
continue;
if (mat.HasProperty("_SSSAndTransmissionType"))
{
CheckOutFile(VSCEnabled, mat);
int materialSSSAndTransmissionID = mat.GetInt("_SSSAndTransmissionType");
// Both;, SSS only, Transmission only
if (materialSSSAndTransmissionID == 2.0)
{
mat.SetInt("_MaterialID", 5);
}
else
{
if (materialSSSAndTransmissionID == 0.0)
mat.SetFloat("_TransmissionEnable", 1.0f);
else
mat.SetFloat("_TransmissionEnable", 0.0f);
}
EditorUtility.SetDirty(mat);
}
}
}
}
finally
{
EditorUtility.ClearProgressBar();
}
}
//
[MenuItem("Internal/HDRenderPipeline/Update/Update Height Maps parametrization")]
static void UpdateHeightMapParametrization()
{
try
{
var matIds = AssetDatabase.FindAssets("t:Material");
for (int i = 0, length = matIds.Length; i < length; i++)
{
var path = AssetDatabase.GUIDToAssetPath(matIds[i]);
var mat = AssetDatabase.LoadAssetAtPath<Material>(path);
EditorUtility.DisplayProgressBar(
"Updating Materials...",
string.Format("{0} / {1} materials updated.", i, length),
i / (float)(length - 1));
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
if (mat.shader.name == "HDRenderPipeline/LitTessellation" ||
mat.shader.name == "HDRenderPipeline/Lit")
{
// Need only test one of the new properties
if (mat.HasProperty("_HeightPoMAmplitude"))
{
CheckOutFile(VSCEnabled, mat);
float valueMax = mat.GetFloat("_HeightMax");
float valueMin = mat.GetFloat("_HeightMin");
float center = mat.GetFloat("_HeightCenter");
float amplitude = valueMax - valueMin;
mat.SetInt("_HeightMapParametrization", 1);
mat.SetFloat("_HeightPoMAmplitude", amplitude);
mat.SetFloat("_HeightTessAmplitude", amplitude);
mat.SetFloat("_HeightOffset", 0.0f);
mat.SetFloat("_HeightTessCenter", center);
BaseLitGUI.DisplacementMode displaceMode = (BaseLitGUI.DisplacementMode)mat.GetInt("_DisplacementMode");
if (displaceMode == BaseLitGUI.DisplacementMode.Pixel)
{
mat.SetFloat("_HeightCenter", 1.0f); // With PoM this is always 1.0f. We set it here to avoid having to open the UI to update it.
}
EditorUtility.SetDirty(mat);
}
}
else if (mat.shader.name == "HDRenderPipeline/LayeredLit" ||
mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
{
int numLayer = (int)mat.GetFloat("_LayerCount");
if (mat.HasProperty("_HeightPoMAmplitude0"))
{
CheckOutFile(VSCEnabled, mat);
for (int x = 0; x < numLayer; ++x)
{
float valueMax = mat.GetFloat("_HeightMax" + x);
float valueMin = mat.GetFloat("_HeightMin" + x);
float center = mat.GetFloat("_HeightCenter" + x);
float amplitude = valueMax - valueMin;
mat.SetInt("_HeightMapParametrization" + x, 1);
mat.SetFloat("_HeightPoMAmplitude" + x, amplitude);
mat.SetFloat("_HeightTessAmplitude" + x, amplitude);
mat.SetFloat("_HeightOffset" + x, 0.0f);
mat.SetFloat("_HeightTessCenter" + x, center);
BaseLitGUI.DisplacementMode displaceMode = (BaseLitGUI.DisplacementMode)mat.GetInt("_DisplacementMode");
if (displaceMode == BaseLitGUI.DisplacementMode.Pixel)
{
mat.SetFloat("_HeightCenter" + x, 1.0f); // With PoM this is always 1.0f. We set it here to avoid having to open the UI to update it.
}
}
EditorUtility.SetDirty(mat);
}
}
}
}
finally
{
EditorUtility.ClearProgressBar();
}
}
// Function used only to check performance of data with and without tessellation
[MenuItem("Internal/HDRenderPipeline/Test/Remove tessellation materials (not reversible)")]
static void RemoveTessellationMaterials()
{
var materials = Resources.FindObjectsOfTypeAll<Material>();
var litShader = Shader.Find("HDRenderPipeline/Lit");
var layeredLitShader = Shader.Find("HDRenderPipeline/LayeredLit");
foreach (var mat in materials)
{
if (mat.shader.name == "HDRenderPipeline/LitTessellation")
{
mat.shader = litShader;
// We remove all keyword already present
CoreEditorUtils.RemoveMaterialKeywords(mat);
LitGUI.SetupMaterialKeywordsAndPass(mat);
EditorUtility.SetDirty(mat);
}
else if (mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
{
mat.shader = layeredLitShader;
// We remove all keyword already present
CoreEditorUtils.RemoveMaterialKeywords(mat);
LayeredLitGUI.SetupMaterialKeywordsAndPass(mat);
EditorUtility.SetDirty(mat);
}
}
}
[MenuItem("Edit/Render Pipeline/Export Sky to Image", priority = CoreUtils.editMenuPriority3)]
static void ExportSkyToImage()
{
var renderpipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline;
if (renderpipeline == null)
{
Debug.LogError("HDRenderPipeline is not instantiated.");
return;
}
var result = renderpipeline.ExportSkyToTexture();
if (result == null)
return;
// Encode texture into PNG
byte[] bytes = result.EncodeToEXR(Texture2D.EXRFlags.CompressZIP);
UnityObject.DestroyImmediate(result);
string assetPath = EditorUtility.SaveFilePanel("Export Sky", "Assets", "SkyExport", "exr");
if (!string.IsNullOrEmpty(assetPath))
{
File.WriteAllBytes(assetPath, bytes);
AssetDatabase.Refresh();
}
}
[MenuItem("GameObject/Rendering/Scene Settings", priority = CoreUtils.gameObjectMenuPriority)]
static void CreateSceneSettingsGameObject(MenuCommand menuCommand)
{
var parent = menuCommand.context as GameObject;
var sceneSettings = CoreEditorUtils.CreateGameObject(parent, "Scene Settings");
GameObjectUtility.SetParentAndAlign(sceneSettings, menuCommand.context as GameObject);
Undo.RegisterCreatedObjectUndo(sceneSettings, "Create " + sceneSettings.name);
Selection.activeObject = sceneSettings;
var profile = VolumeProfileFactory.CreateVolumeProfile(sceneSettings.scene, "Scene Settings");
VolumeProfileFactory.CreateVolumeComponent<HDShadowSettings>(profile, true, false);
var visualEnv = VolumeProfileFactory.CreateVolumeComponent<VisualEnvironment>(profile, true, false);
visualEnv.skyType.value = SkySettings.GetUniqueID<ProceduralSky>();
visualEnv.fogType.value = FogType.Exponential;
VolumeProfileFactory.CreateVolumeComponent<ProceduralSky>(profile, true, false);
VolumeProfileFactory.CreateVolumeComponent<ExponentialFog>(profile, true, true);
var volume = sceneSettings.AddComponent<Volume>();
volume.isGlobal = true;
volume.sharedProfile = profile;
var bakingSky = sceneSettings.AddComponent<BakingSky>();
bakingSky.profile = volume.sharedProfile;
bakingSky.bakingSkyUniqueID = SkySettings.GetUniqueID<ProceduralSky>();
}
class DoCreateNewAsset<TAssetType> : ProjectWindowCallback.EndNameEditAction where TAssetType : ScriptableObject
{
public override void Action(int instanceId, string pathName, string resourceFile)
{
var newAsset = CreateInstance<TAssetType>();
newAsset.name = Path.GetFileName(pathName);
AssetDatabase.CreateAsset(newAsset, pathName);
ProjectWindowUtil.ShowCreatedAsset(newAsset);
}
}
class DoCreateNewAssetDiffusionProfileSettings : DoCreateNewAsset<DiffusionProfileSettings> {}
[MenuItem("Assets/Create/Rendering/Diffusion profile Settings", priority = CoreUtils.assetCreateMenuPriority2)]
static void MenuCreateDiffusionProfile()
{
var icon = EditorGUIUtility.FindTexture("ScriptableObject Icon");
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance<DoCreateNewAssetDiffusionProfileSettings>(), "New Diffusion Profile Settings.asset", icon, null);
}
static void ResetAllMaterialAssetsKeywords(float progressScale, float progressOffset)
{
var matIds = AssetDatabase.FindAssets("t:Material");
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
for (int i = 0, length = matIds.Length; i < length; i++)
{
var path = AssetDatabase.GUIDToAssetPath(matIds[i]);
var mat = AssetDatabase.LoadAssetAtPath<Material>(path);
EditorUtility.DisplayProgressBar(
"Setup material asset's Keywords...",
string.Format("{0} / {1} materials cleaned.", i, length),
(i / (float)(length - 1)) * progressScale + progressOffset);
CheckOutFile(VSCEnabled, mat);
var h = Debug.unityLogger.logHandler;
Debug.unityLogger.logHandler = new UnityContextualLogHandler(mat);
HDEditorUtils.ResetMaterialKeywords(mat);
Debug.unityLogger.logHandler = h;
}
}
static bool ResetAllLoadedMaterialKeywords(string descriptionPrefix, float progressScale, float progressOffset)
{
var materials = Resources.FindObjectsOfTypeAll<Material>();
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive);
bool anyMaterialDirty = false; // Will be true if any material is dirty.
for (int i = 0, length = materials.Length; i < length; i++)
{
EditorUtility.DisplayProgressBar(
"Setup materials Keywords...",
string.Format("{0}{1} / {2} materials cleaned.", descriptionPrefix, i, length),
(i / (float)(length - 1)) * progressScale + progressOffset);
CheckOutFile(VSCEnabled, materials[i]);
if (HDEditorUtils.ResetMaterialKeywords(materials[i]))
{
anyMaterialDirty = true;
}
}
return anyMaterialDirty;
}
class UnityContextualLogHandler : ILogHandler
{
UnityObject m_Context;
static readonly ILogHandler k_DefaultLogHandler = Debug.unityLogger.logHandler;
public UnityContextualLogHandler(UnityObject context)
{
m_Context = context;
}
public void LogFormat(LogType logType, UnityObject context, string format, params object[] args)
{
k_DefaultLogHandler.LogFormat(LogType.Log, m_Context, "Context: {0} ({1})", m_Context, AssetDatabase.GetAssetPath(m_Context));
k_DefaultLogHandler.LogFormat(logType, context, format, args);
}
public void LogException(Exception exception, UnityObject context)
{
k_DefaultLogHandler.LogFormat(LogType.Log, m_Context, "Context: {0} ({1})", m_Context, AssetDatabase.GetAssetPath(m_Context));
k_DefaultLogHandler.LogException(exception, context);
}
}
}
}

8
com.unity.render-pipelines.high-definition/HDRP/Editor/BuildPlayer.meta


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

8
com.unity.render-pipelines.high-definition/HDRP/Editor/AssetPostProcessors.meta


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

8
com.unity.render-pipelines.high-definition/HDRP/Decal.meta


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

/com.unity.render-pipelines.high-definition/HDRP/Editor/EditorRenderPipelineResources → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipelineResources

/com.unity.render-pipelines.high-definition/HDRP/Editor/BuildPlayer → /com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors

/com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPVariantStripper.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPreprocessShaders.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPVariantStripper.cs → /com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPreprocessShaders.cs

/com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPCustomBuildProcessor.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPPreprocessBuild.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPCustomBuildProcessor.cs → /com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPPreprocessBuild.cs

/com.unity.render-pipelines.high-definition/HDRP/Editor/AssetPostProcessors → /com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors

/com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors/NormalMapVarianceTexturePostprocessor.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors/NormalMapAverageLengthTexturePostprocessor.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors/NormalMapVarianceTexturePostprocessor.cs → /com.unity.render-pipelines.high-definition/HDRP/Editor/AssetProcessors/NormalMapAverageLengthTexturePostprocessor.cs

/com.unity.render-pipelines.high-definition/HDRP/Editor/UpgradeStandardShaderMaterials.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/UpgradeStandardShaderMaterials.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDRenderPipelineMenuItems.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDRenderPipelineMenuItems.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDAssetFactory.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDAssetFactory.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDEditorUtils.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDEditorUtils.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDBaseEditor.cs → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDBaseEditor.cs

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDBaseEditor.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDBaseEditor.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDEditorCLI.cs → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDEditorCLI.cs

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDEditorCLI.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDEditorCLI.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/cli.ps1 → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/cli.ps1

/com.unity.render-pipelines.high-definition/HDRP/Editor/cli.ps1.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/cli.ps1.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/UpgradeStandardShaderMaterials.cs → /com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/UpgradeStandardShaderMaterials.cs

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDEditorUtils.cs → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDEditorUtils.cs

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDShaderIncludePaths.cs → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDShaderIncludePaths.cs

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDShaderIncludePaths.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDShaderIncludePaths.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/BaseUI.cs → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/BaseUI.cs

/com.unity.render-pipelines.high-definition/HDRP/Editor/BaseUI.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/BaseUI.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/Editor/HDAssetFactory.cs → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/HDAssetFactory.cs

/com.unity.render-pipelines.high-definition/HDRP/Editor/RenderLoopSettings → /com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/Settings

/com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/RenderPipelineSettings.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/RenderPipelineSettings.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/FrameSettings.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/FrameSettings.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/FrameSettings.cs → /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/FrameSettings.cs

/com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/RenderPipelineSettings.cs → /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/RenderPipelineSettings.cs

/com.unity.render-pipelines.high-definition/HDRP/HDUtils.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDUtils.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/HDUtils.cs → /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDUtils.cs

/com.unity.render-pipelines.high-definition/HDRP/HDStringConstants.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDStringConstants.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/HDRenderQueue.cs.meta → /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderQueue.cs.meta

/com.unity.render-pipelines.high-definition/HDRP/HDRenderQueue.cs → /com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderQueue.cs

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

正在加载...
取消
保存