浏览代码

Update embedded packages to latest 7.1.1

/demo-work
André McGrail 5 年前
当前提交
f64ae227
共有 456 个文件被更改,包括 883 次插入568 次删除
  1. 3
      Packages/com.unity.render-pipelines.core/CHANGELOG.md
  2. 21
      Packages/com.unity.render-pipelines.core/Editor/LookDev/Context.cs
  3. 5
      Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow-PersonalSkin.uss
  4. 53
      Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.DebugSidePanel.cs
  5. 10
      Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs
  6. 103
      Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs
  7. 65
      Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.uss
  8. 4
      Packages/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs
  9. 2
      Packages/com.unity.render-pipelines.core/Editor/LookDev/ToolbarRadio.cs
  10. 20
      Packages/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentProvider.cs
  11. 11
      Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerEnumHistory.cs
  12. 10
      Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerToggleHistory.cs
  13. 84
      Packages/com.unity.render-pipelines.core/Runtime/Utilities/CameraCaptureBridge.cs
  14. 5
      Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeComponent.cs
  15. 5
      Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl
  16. 2
      Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl
  17. 2
      Packages/com.unity.render-pipelines.core/package.json
  18. 7
      Packages/com.unity.render-pipelines.universal/CHANGELOG.md
  19. 2
      Packages/com.unity.render-pipelines.universal/Documentation~/2DLightProperties.md
  20. 21
      Packages/com.unity.render-pipelines.universal/Documentation~/2d-index.md
  21. 2
      Packages/com.unity.render-pipelines.universal/Documentation~/HDREmulationScale.md
  22. 12
      Packages/com.unity.render-pipelines.universal/Documentation~/LightBlendStyles.md
  23. 4
      Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Channel-Mixer.md
  24. 6
      Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Color-Adjustments.md
  25. 4
      Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Color-Curves.md
  26. 6
      Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Film-Grain.md
  27. 4
      Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Lens-Distortion.md
  28. 10
      Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Lift-Gamma-Gain.md
  29. 4
      Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Panini-Projection.md
  30. 10
      Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Shadows-Midtones-Highlights.md
  31. 8
      Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Split-Toning.md
  32. 4
      Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-White-Balance.md
  33. 17
      Packages/com.unity.render-pipelines.universal/Documentation~/Setup.md
  34. 2
      Packages/com.unity.render-pipelines.universal/Documentation~/ShaderGraph.md
  35. 55
      Packages/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md
  36. 13
      Packages/com.unity.render-pipelines.universal/Documentation~/index.md
  37. 10
      Packages/com.unity.render-pipelines.universal/Documentation~/integration-with-post-processing.md
  38. 12
      Packages/com.unity.render-pipelines.universal/Documentation~/rendering-in-universalrp.md
  39. 9
      Packages/com.unity.render-pipelines.universal/Documentation~/shader-stripping.md
  40. 10
      Packages/com.unity.render-pipelines.universal/Documentation~/shaders-in-universalrp.md
  41. 14
      Packages/com.unity.render-pipelines.universal/Documentation~/shading-model.md
  42. 14
      Packages/com.unity.render-pipelines.universal/Documentation~/simple-lit-shader.md
  43. 10
      Packages/com.unity.render-pipelines.universal/Documentation~/speedtree.md
  44. 22
      Packages/com.unity.render-pipelines.universal/Documentation~/universalrp-asset.md
  45. 4
      Packages/com.unity.render-pipelines.universal/Documentation~/universalrp-builtin-feature-comparison.md
  46. 14
      Packages/com.unity.render-pipelines.universal/Documentation~/unlit-shader.md
  47. 8
      Packages/com.unity.render-pipelines.universal/Documentation~/upgrading-your-shaders.md
  48. 7
      Packages/com.unity.render-pipelines.universal/Editor/2D/Light2DEditor.cs
  49. 1
      Packages/com.unity.render-pipelines.universal/Editor/2D/Renderer2DMenus.cs
  50. 2
      Packages/com.unity.render-pipelines.universal/Editor/2D/ShadowCaster2DEditor.cs
  51. 14
      Packages/com.unity.render-pipelines.universal/Editor/2D/SortingLayerDropDown.cs
  52. 47
      Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteLitMasterNode.cs
  53. 47
      Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteUnlitMasterNode.cs
  54. 1
      Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineLightEditor.cs
  55. 1
      Packages/com.unity.render-pipelines.universal/Runtime/2D/Passes/Utility/RendererLighting.cs
  56. 43
      Packages/com.unity.render-pipelines.universal/Runtime/Data/UniversalRenderPipelineAsset.cs
  57. 7
      Packages/com.unity.render-pipelines.universal/Runtime/ForwardRendererData.cs
  58. 18
      Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl
  59. 22
      Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl
  60. 3
      Packages/com.unity.render-pipelines.universal/Shaders/2D/Light2D-Point.shader
  61. 18
      Packages/com.unity.render-pipelines.universal/Shaders/LitMetaPass.hlsl
  62. 18
      Packages/com.unity.render-pipelines.universal/Shaders/SimpleLitMetaPass.hlsl
  63. 1
      Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainDetailLit.shader
  64. 9
      Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitPasses.hlsl
  65. 5
      Packages/com.unity.render-pipelines.universal/Tests/Runtime/RuntimeTests.cs
  66. 2
      Packages/com.unity.render-pipelines.universal/package.json
  67. 10
      Packages/com.unity.shadergraph/CHANGELOG.md
  68. 6
      Packages/com.unity.shadergraph/Editor/AssetCallbacks/CreateShaderGraph.cs
  69. 6
      Packages/com.unity.shadergraph/Editor/Data/Enumerations/Precision.cs
  70. 31
      Packages/com.unity.shadergraph/Editor/Data/Graphs/AbstractShaderProperty.cs
  71. 2
      Packages/com.unity.shadergraph/Editor/Data/Graphs/BitangentMaterialSlot.cs
  72. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/BooleanMaterialSlot.cs
  73. 27
      Packages/com.unity.shadergraph/Editor/Data/Graphs/BooleanShaderProperty.cs
  74. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/ColorMaterialSlot.cs
  75. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/ColorRGBMaterialSlot.cs
  76. 26
      Packages/com.unity.shadergraph/Editor/Data/Graphs/ColorShaderProperty.cs
  77. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/CubemapInputMaterialSlot.cs
  78. 41
      Packages/com.unity.shadergraph/Editor/Data/Graphs/CubemapShaderProperty.cs
  79. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/DynamicMatrixMaterialSlot.cs
  80. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/DynamicValueMaterialSlot.cs
  81. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/DynamicVectorMaterialSlot.cs
  82. 2
      Packages/com.unity.shadergraph/Editor/Data/Graphs/GradientInputMaterialSlot.cs
  83. 28
      Packages/com.unity.shadergraph/Editor/Data/Graphs/GradientShaderProperty.cs
  84. 10
      Packages/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs
  85. 2
      Packages/com.unity.shadergraph/Editor/Data/Graphs/MaterialSlot.cs
  86. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix2MaterialSlot.cs
  87. 13
      Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix2ShaderProperty.cs
  88. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix3MaterialSlot.cs
  89. 13
      Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix3ShaderProperty.cs
  90. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix4MaterialSlot.cs
  91. 11
      Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix4ShaderProperty.cs
  92. 11
      Packages/com.unity.shadergraph/Editor/Data/Graphs/MatrixShaderProperty.cs
  93. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/NormalMaterialSlot.cs
  94. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/PositionMaterialSlot.cs
  95. 1
      Packages/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs
  96. 25
      Packages/com.unity.shadergraph/Editor/Data/Graphs/SamplerStateShaderProperty.cs
  97. 4
      Packages/com.unity.shadergraph/Editor/Data/Graphs/SerializableCubemap.cs
  98. 4
      Packages/com.unity.shadergraph/Editor/Data/Graphs/SerializableTexture.cs
  99. 4
      Packages/com.unity.shadergraph/Editor/Data/Graphs/SerializableTextureArray.cs
  100. 173
      Packages/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs

3
Packages/com.unity.render-pipelines.core/CHANGELOG.md


The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [7.1.1] - 2019-XX-XX
## [7.1.1] - 2019-09-05
### Added
- Add separated debug mode in LookDev.

- `ResourceReloader` now works on non-public fields.
- Removed `normalize` from `UnpackNormalRGB` to match `UnpackNormalAG`.
- Fixed shadow routines compilation errors when "real" type is a typedef on "half".
- Removed debug menu in non development build.

21
Packages/com.unity.render-pipelines.core/Editor/LookDev/Context.cs


/// <summary>
/// Status of the side panel of the LookDev window
/// </summary>
[Flags]
Environment = 1,
DebugView1 = 2,
DebugView2 = 4,
DebugViewBoth = 6,
None = -1,
Environment,
Debug,
/// <summary>
/// The target views of the debug panel
/// </summary>
public enum TargetDebugView
{
First,
Both,
Second
};
/// <summary>
/// Class containing all data used by the LookDev Window to render

public ViewIndex lastFocusedView = ViewIndex.First;
/// <summary>The state of the side panel</summary>
public SidePanel showedSidePanel;
/// <summary>The view to change when manipulating the Debug side panel</summary>
[NonSerialized]
public TargetDebugView debugPanelSource = TargetDebugView.Both;
[SerializeField]
internal ComparisonGizmoState gizmoState = new ComparisonGizmoState();

5
Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow-PersonalSkin.uss


border-color: #999999;
}
#debugToolbar
{
border-color: #999999;
}
MultipleSourcePopupField > MultipleDifferentValue
{
background-color: #DFDFDF;

53
Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.DebugSidePanel.cs


// /!\ WARNING:
//The following const are used in the uss.
//If you change them, update the uss file too.
internal const string k_DebugToolbarLineName = "debugToolbarLine";
internal const string k_Lock = "lock";
}

ViewContext lastFocusedViewContext
=> LookDev.currentContext.GetViewContent(LookDev.currentContext.layout.lastFocusedView);
TargetDebugView targetDebugView
{
get => layout.debugPanelSource;
set
{
if (layout.debugPanelSource != value)
{
layout.debugPanelSource = value;
UpdateSideDebugPanelProperties();
}
}
}
bool debugView1SidePanel
=> targetDebugView == TargetDebugView.First
|| targetDebugView == TargetDebugView.Both;
bool debugView2SidePanel
=> targetDebugView == TargetDebugView.Second
|| targetDebugView == TargetDebugView.Both;
void ApplyInFilteredViewsContext(Action<ViewContext> action)
{
if (debugView1SidePanel)

m_DebugContainer = new VisualElement() { name = Style.k_DebugContainerName };
m_MainContainer.Add(m_DebugContainer);
if (debugOneOfViewSidePanel)
if (sidePanel == SidePanel.Debug)
AddDebugViewSelector();
AddDebugShadow();
AddDebugViewMode();

//[TODO: debug why list sometimes empty on resource reloading]
//[TODO: display only per view]
if (debugOneOfViewSidePanel)
if (sidePanel == SidePanel.Debug)
void AddDebugViewSelector()
{
ToolbarRadio viewSelector = new ToolbarRadio()
{
name = Style.k_DebugToolbarName
};
viewSelector.AddRadios(new[]
{
Style.k_Camera1Icon,
Style.k_LinkIcon,
Style.k_Camera2Icon
});
viewSelector.SetValueWithoutNotify((int)targetDebugView);
viewSelector.RegisterValueChangedCallback(evt
=> targetDebugView = (TargetDebugView)evt.newValue);
m_DebugContainer.Add(viewSelector);
}
void AddDebugShadow()
{
m_Shadow = new MultipleSourceToggle(Style.k_DebugShadowLabel);

//So compute the list on next frame only.
if (LookDev.dataProvider == null)
{
EditorApplication.delayCall += () => AddDebugViewMode(1); //1 = hardcoded position of this field
EditorApplication.delayCall += () => AddDebugViewMode(2); //2 = hardcoded position of this field
return;
}

listDebugMode = new List<string>(LookDev.dataProvider?.supportedDebugModes ?? Enumerable.Empty<string>());
listDebugMode.Insert(0, "None");
m_DebugView = new MultipleSourcePopupField(Style.k_DebugViewMode, listDebugMode);
if (debugOneOfViewSidePanel)
if (sidePanel == SidePanel.Debug)
ReadValueFromSourcesWithoutNotify(m_DebugView, view => listDebugMode[view.debug.viewMode + 1]);
m_DebugView.RegisterValueChangedCallback(evt
=> ApplyInFilteredViewsContext(view => view.debug.viewMode = listDebugMode.IndexOf(evt.newValue) - 1));

10
Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs


internal static readonly Texture2D k_AddIcon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "Add", forceLowRes: true);
internal static readonly Texture2D k_RemoveIcon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "Remove", forceLowRes: true);
internal static readonly Texture2D k_DuplicateIcon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "Duplicate", forceLowRes: true);
internal const string k_DragAndDropLibrary = "Drag and drop EnvironmentLibrary here";
}
VisualElement m_EnvironmentContainer;

m_EnvironmentContainer = new VisualElement() { name = Style.k_EnvironmentContainerName };
m_MainContainer.Add(m_EnvironmentContainer);
if (environmentSidePanel)
if (sidePanel == SidePanel.Environment)
m_MainContainer.AddToClassList(Style.k_ShowEnvironmentPanelClass);
m_EnvironmentInspector = new EnvironmentElement(withPreview: false, () =>

};
m_EnvironmentList.onItemChosen += obj =>
EditorGUIUtility.PingObject(LookDev.currentContext.environmentLibrary[(int)obj]);
m_NoEnvironmentList = new Label("Drag'n'drop EnvironmentLibrary here");
m_NoEnvironmentList = new Label(Style.k_DragAndDropLibrary);
m_NoEnvironmentList.style.flexGrow = 1;
m_NoEnvironmentList.style.unityTextAlign = TextAnchor.MiddleCenter;
m_EnvironmentContainer.Add(m_EnvironmentInspector);

OnChangingEnvironmentInViewInternal?.Invoke(environment, ViewCompositionIndex.Composite, mouseWorldPosition);
else
OnChangingEnvironmentInViewInternal?.Invoke(environment, ViewCompositionIndex.First, mouseWorldPosition);
m_NoEnvironment1.style.visibility = environment == null || environment.Equals(null) ? Visibility.Visible : Visibility.Hidden;
{
m_NoEnvironment2.style.visibility = environment == null || environment.Equals(null) ? Visibility.Visible : Visibility.Hidden;
}
}
class DraggingContext : IDisposable

103
Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs


{
if (layout.viewLayout != value)
{
OnLayoutChangedInternal?.Invoke(value, layout.showedSidePanel);
OnLayoutChangedInternal?.Invoke(value, sidePanel);
bool environmentSidePanel
SidePanel sidePanel
get => (layout.showedSidePanel & SidePanel.Environment) != 0;
set
{
bool stored = (layout.showedSidePanel & SidePanel.Environment) != 0;
if (value != stored)
{
if (value)
layout.showedSidePanel |= SidePanel.Environment;
else
layout.showedSidePanel &= ~SidePanel.Environment;
ApplySidePanelChange(layout.showedSidePanel);
}
}
}
bool debugView1SidePanel
{
get => (layout.showedSidePanel & SidePanel.DebugView1) != 0;
set
{
bool stored = (layout.showedSidePanel & SidePanel.DebugView1) != 0;
if (value != stored)
{
if (value)
layout.showedSidePanel |= SidePanel.DebugView1;
else
layout.showedSidePanel &= ~SidePanel.DebugView1;
ApplySidePanelChange(layout.showedSidePanel);
}
}
}
bool debugView2SidePanel
{
get => (layout.showedSidePanel & SidePanel.DebugView2) != 0;
get => layout.showedSidePanel;
bool stored = (layout.showedSidePanel & SidePanel.DebugView2) != 0;
if (value != stored)
if (layout.showedSidePanel != value)
if (value)
layout.showedSidePanel |= SidePanel.DebugView2;
else
layout.showedSidePanel &= ~SidePanel.DebugView2;
OnLayoutChangedInternal?.Invoke(viewLayout, value);
bool debugOneOfViewSidePanel
=> (layout.showedSidePanel & SidePanel.DebugViewBoth) != 0;
event Action<Layout, SidePanel> OnLayoutChangedInternal;
event Action<Layout, SidePanel> IViewDisplayer.OnLayoutChanged
{

DropdownMenuAction.AlwaysEnabled);
// Side part
var sideEnvironmentToggle = new ToolbarToggle()
var sideRadio = new ToolbarRadio(canDeselectAll: true)
text = Style.k_EnvironmentSidePanelName,
sideEnvironmentToggle.SetValueWithoutNotify(environmentSidePanel);
sideEnvironmentToggle.RegisterCallback((ChangeEvent<bool> evt)
=> environmentSidePanel = evt.newValue);
var sideDebugToggleView1 = new ToolbarToggle()
{
name = Style.k_TabsRadioName
};
var sideDebugToggleView1Container = sideDebugToggleView1.Q(className:"unity-toggle__input");
sideDebugToggleView1Container.Add(new Label(Style.k_DebugSidePanelName));
sideDebugToggleView1Container.Add(new Image() { image = Style.k_Camera1Icon });
sideDebugToggleView1.SetValueWithoutNotify(debugView1SidePanel);
sideDebugToggleView1.RegisterCallback((ChangeEvent<bool> evt)
=> debugView1SidePanel = evt.newValue);
var sideDebugToggleView2 = new ToolbarToggle()
{
name = Style.k_TabsRadioName
};
var sideDebugToggleView2Container = sideDebugToggleView2.Q(className: "unity-toggle__input");
sideDebugToggleView2Container.Add(new Label(Style.k_DebugSidePanelName));
sideDebugToggleView2Container.Add(new Image() { image = Style.k_Camera2Icon });
sideDebugToggleView2.SetValueWithoutNotify(debugView2SidePanel);
sideDebugToggleView2.RegisterCallback((ChangeEvent<bool> evt)
=> debugView2SidePanel = evt.newValue);
var sideToolbar = new Toolbar() { name = Style.k_SideToolbarName };
sideToolbar.Add(sideEnvironmentToggle);
sideToolbar.Add(sideDebugToggleView1);
sideToolbar.Add(sideDebugToggleView2);
sideRadio.AddRadios(new[] {
Style.k_EnvironmentSidePanelName,
Style.k_DebugSidePanelName,
});
sideRadio.SetValueWithoutNotify((int)sidePanel);
sideRadio.RegisterCallback((ChangeEvent<int> evt)
=> sidePanel = (SidePanel)evt.newValue);
// Aggregate parts
var toolbar = new Toolbar() { name = Style.k_ToolbarName };

toolbar.Add(renderDocButton);
toolbar.Add(new ToolbarSpacer());
}
toolbar.Add(sideToolbar);
toolbar.Add(sideRadio);
rootVisualElement.Add(toolbar);
}

{
LookDev.currentContext.SetFocusedCamera(index);
var environment = LookDev.currentContext.GetViewContent(index).environment;
if (environmentSidePanel && environment != null)
if (sidePanel == SidePanel.Environment && environment != null)
m_EnvironmentList.selectedIndex = LookDev.currentContext.environmentLibrary.IndexOf(environment);
});
var secondManipulator = new CameraController(

{
LookDev.currentContext.SetFocusedCamera(ViewIndex.Second);
var environment = LookDev.currentContext.GetViewContent(ViewIndex.Second).environment;
if (environmentSidePanel && environment != null)
if (sidePanel == SidePanel.Environment && environment != null)
m_EnvironmentList.selectedIndex = LookDev.currentContext.environmentLibrary.IndexOf(environment);
});
var gizmoManipulator = new ComparisonGizmoController(LookDev.currentContext.layout.gizmoState, firstOrCompositeManipulator);

IStyle GetEnvironmentContenairDraggerStyle()
=> m_EnvironmentContainer.Q(className: "unity-base-slider--vertical").Q("unity-dragger").style;
if (environmentSidePanel)
if (sidePanel == SidePanel.Environment)
{
if (!m_MainContainer.ClassListContains(Style.k_ShowEnvironmentPanelClass))
m_MainContainer.AddToClassList(Style.k_ShowEnvironmentPanelClass);

m_EnvironmentContainer.style.display = DisplayStyle.None;
}
if (debugOneOfViewSidePanel)
if (sidePanel == SidePanel.Debug)
{
if (!m_MainContainer.ClassListContains(Style.k_ShowDebugPanelClass))
m_MainContainer.AddToClassList(Style.k_ShowDebugPanelClass);

65
Packages/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.uss


-unity-font-style: bold;
font-size: 15px;
-unity-text-align: middle-center;
margin-bottom: 2px;
height: 15px;
}
MultipleSourcePopupField > MultipleDifferentValue

background-color: #585858;
}
#debugToolbarLine > Label
#debugToolbar
-unity-text-align: middle-left;
margin-left: 3px;
margin-top: 16px;
margin-bottom: 16px;
flex-direction: row;
align-self: center;
border-bottom-width: 1px;
border-top-width: 1px;
border-color: #232323;
#debugToolbarLine > ToolbarRadio
#debugToolbar > ToolbarToggle
width: 63px;
border-bottom-width: 1px;
border-color: #232323;
width: 40px;
left: 0px;
#debugToolbarLine
#debugToolbar > ToolbarToggle > *
flex-direction: row;
justify-content: center;
}
/* /////// */

padding: 2px;
}
#sideToolbar
#tabsRadio
width: 249px;
}
#sideToolbar > #tabsRadio
{
min-width: auto;
width: 250px;
min-width: 250px;
max-width: 250px;
padding-left: 3px;
padding-right: 3px;
border-left-width: 1px;
border-right-width: 0px;
#sideToolbar > #tabsRadio > * > #unity-checkmark
#tabsRadio > ToolbarToggle
height: auto;
min-width: 0;
width: 0;
flex: 1;
left: 0px;
#sideToolbar > #tabsRadio > * > Label
#tabsRadio > ToolbarToggle > * > Label
min-width: 50px;
width: auto;
align-self: center;
flex: 1;
}
.unity-toolbar-toggle

{
position: absolute;
}
/* TEST UNDER THIS LINE */
#firstView
{
background-color: rgb(255, 0, 0);
}
#secondView
{
background-color: rgb(0, 255, 0);
}

4
Packages/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs


{
case ViewIndex.First:
stage = new Stage(firstStageName);
stage.camera.backgroundColor = Compositer.firstViewGizmoColor;
stage.camera.backgroundColor = new Color32(5, 5, 5, 255);
stage.camera.backgroundColor = Compositer.secondViewGizmoColor;
stage.camera.backgroundColor = new Color32(5, 5, 5, 255);
stage.camera.name += "_2";
break;
default:

2
Packages/com.unity.render-pipelines.core/Editor/LookDev/ToolbarRadio.cs


AddToClassList(ussClassName);
m_CanDeselectAll = canDeselectAll;
if (m_CanDeselectAll)
m_Value = -1;
if (label != null)
Add(new Label() { text = label });
}

20
Packages/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentProvider.cs


{
tree.Add(new GroupElement(0, "Volume Overrides"));
var attrType = typeof(VolumeComponentMenu);
var types = VolumeManager.instance.baseComponentTypes;
var rootNode = new PathNode();

string path = string.Empty;
// Look for a VolumeComponentMenu attribute
var attrs = t.GetCustomAttributes(attrType, false);
if (attrs.Length > 0)
var attrs = t.GetCustomAttributes(false);
bool skipComponent = false;
foreach (var attr in attrs)
var attr = attrs[0] as VolumeComponentMenu;
if (attr != null)
path = attr.menu;
var attrMenu = attr as VolumeComponentMenu;
if (attrMenu != null)
path = attrMenu.menu;
var attrDeprecated = attr as VolumeComponentDeprecated;
if (attrDeprecated != null)
skipComponent = true;
if (skipComponent)
continue;
// If no attribute or in case something went wrong when grabbing it, fallback to a
// beautified class name

11
Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerEnumHistory.cs


using System.Collections;
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI

if (indexHistory < historyValues.Length && historyValues[indexHistory] != null)
historyValues[indexHistory].text = field.enumNames[field.GetHistoryValue(indexHistory)].text;
}
if (isActiveAndEnabled)
StartCoroutine(RefreshAfterSanitization());
}
IEnumerator RefreshAfterSanitization()
{
yield return null; //wait one frame
m_Field.currentIndex = m_Field.getIndex();
valueLabel.text = m_Field.enumNames[m_Field.currentIndex].text;
}
}
}

10
Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerToggleHistory.cs


using System.Collections;
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI

if (index < historyToggles.Length && historyToggles[index] != null)
historyToggles[index].isOn = field.GetHistoryValue(index);
}
if (isActiveAndEnabled)
StartCoroutine(RefreshAfterSanitization());
}
IEnumerator RefreshAfterSanitization()
{
yield return null; //wait one frame
valueToggle.isOn = m_Field.getter();
}
}
}

84
Packages/com.unity.render-pipelines.core/Runtime/Utilities/CameraCaptureBridge.cs


#if UNITY_EDITOR
#if USE_REFLECTION
using System.Reflection;
#else
using UnityEditor.Recorder;
#endif

public static class CameraCaptureBridge
{
#if USE_REFLECTION
static FieldInfo m_Enabled;
static MethodInfo m_GetActions;
private static FieldInfo m_Enabled;
private static MethodInfo m_GetActions;
private static Dictionary<Camera, HashSet<Action<RenderTargetIdentifier, CommandBuffer>>> actionDict =
new Dictionary<Camera, HashSet<Action<RenderTargetIdentifier, CommandBuffer>>>();
private static bool _enabled;
static CameraCaptureBridge()
{
#if USE_REFLECTION

const string useCameraCaptureCallbacksFieldName = "useCameraCaptureCallbacks";
var useCameraCaptureCallbacksField = optionsType.GetField(
useCameraCaptureCallbacksFieldName, BindingFlags.Public | BindingFlags.Static);
useCameraCaptureCallbacksFieldName,
BindingFlags.Public | BindingFlags.Static);
if (useCameraCaptureCallbacksField == null)
return;

const string getActionsMethodName = "GetActions";
var getActionsMethod = captureType.GetMethod(
getActionsMethodName, BindingFlags.Public | BindingFlags.Static);
getActionsMethodName,
BindingFlags.Public | BindingFlags.Static);
if (getActionsMethod == null)
return;

}
static public bool enabled
public static bool enabled
m_Enabled == null ? false : (bool)m_Enabled.GetValue(null)
m_Enabled == null ? _enabled : (bool)m_Enabled.GetValue(null)
false
_enabled
set
{
#if USE_REFLECTION

#endif
_enabled = value;
static public IEnumerator<Action<RenderTargetIdentifier, CommandBuffer> > GetCaptureActions(Camera camera)
/// <summary>
/// Provides the set actions to the renderer to be triggered at the end of the render loop for camera capture
/// </summary>
/// <param name="camera">The camera to get actions for</param>
/// <returns>Enumeration of actions</returns>
public static IEnumerator<Action<RenderTargetIdentifier, CommandBuffer>> GetCaptureActions(Camera camera)
return
m_GetActions == null ? null :
(m_GetActions.Invoke(null, new object [] { camera } ) as
IEnumerator<Action<RenderTargetIdentifier, CommandBuffer> >)
if (m_GetActions != null)
{
var recorderActions = (m_GetActions.Invoke(null, new object[] { camera }) as IEnumerator<Action<RenderTargetIdentifier, CommandBuffer>>);
if (recorderActions != null)
return recorderActions;
}
UnityEditor.Recorder.Input.CameraCapture.GetActions(camera)
#else
null
var recorderActions = UnityEditor.Recorder.Input.CameraCapture.GetActions(camera);
if (recorderActions != null)
return recorderActions;
;
if (!actionDict.TryGetValue(camera, out var actions))
return null;
return actions.GetEnumerator();
}
/// <summary>
/// Adds actions for camera capture
/// </summary>
/// <param name="camera">The camera to add actions for</param>
/// <param name="action">The action to add</param>
public static void AddCaptureAction(Camera camera, Action<RenderTargetIdentifier, CommandBuffer> action)
{
actionDict.TryGetValue(camera, out var actions);
if (actions == null)
{
actions = new HashSet<Action<RenderTargetIdentifier, CommandBuffer>>();
actionDict.Add(camera, actions);
}
actions.Add(action);
}
/// <summary>
/// Removes actions for camera capture
/// </summary>
/// <param name="camera">The camera to remove actions for</param>
/// <param name="action">The action to remove</param>
public static void RemoveCaptureAction(Camera camera, Action<RenderTargetIdentifier, CommandBuffer> action)
{
if (camera == null)
return;
if (actionDict.TryGetValue(camera, out var actions))
actions.Remove(action);
}
}
}

5
Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeComponent.cs


}
}
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class VolumeComponentDeprecated : Attribute
{
}
[Serializable]
public class VolumeComponent : ScriptableObject
{

5
Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl


return normalize(lerp(A, B, t));
}
float Length2(float3 v)
{
return dot(v, v);
}
real Pow4(real x)
{
return (x * x) * (x * x);

2
Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl


real3 normal;
normal.xyz = packedNormal.rgb * 2.0 - 1.0;
normal.xy *= scale;
return normalize(normal);
return normal;
}
real3 UnpackNormalRGBNoScale(real4 packedNormal)

2
Packages/com.unity.render-pipelines.core/package.json


"description": "Helper library for SRP that contains a new Shader Library, and utility functions that can be used to implement a custom SRP. This library is currently used by both the High Definition Render Pipeline and the Lightweight Render Pipeline.",
"version": "7.1.1",
"unity": "2019.3",
"unityRelease": "0a12",
"unityRelease": "0b4",
"displayName": "Core RP Library",
"dependencies": {
"com.unity.ugui" : "1.0.0"

7
Packages/com.unity.render-pipelines.universal/CHANGELOG.md


The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [7.1.1] - 2019-XX-XX
## [7.1.1] - 2019-09-05
### Upgrade Guide
- The render pipeline now handles custom renderers differently. You must now set up renderers for the Camera on the Render Pipeline Asset.
- Render Pipeline Assets upgrades automatically and either creates a default forward renderer in your project or links the existing custom one that you've assigned.

- Added CinemachineUniversalPixelPerfect, a Cinemachine Virtual Camera Extension that solves some compatibility issues between Cinemachine and Pixel Perfect Camera.
- Added an option that disables the depth/stencil buffer for the 2D Renderer.
- Added manipulation handles for the inner cone angle for spot lights.
- Added documentation for the built-in post-processing solution and Volumes framework (and removed incorrect mention of the PPv2 package).
### Changed
- Increased visible lights limit for the forward renderer. It now supports 256 visible lights except in mobile platforms. Mobile platforms support 32 visible lights.

- There is now a list of `ScriptableRendererData` on the Render Pipeline Asset as opposed to a renderer type. These are available to all Cameras and are included in builds.
- The renderer override on the Camera is now an enum that maps to the list of `ScriptableRendererData` on the Render Pipeline Asset.
- Pixel Perfect Camera now allows rendering to a render texture.
- Light2D GameObjects that you've created now have a default position with z equal to 0.
- Documentation: Changed the "Getting Started" section into "Install and Configure". Re-arranged the Table of Content.
### Fixed
- Fixed LightProbe occlusion contribution. [case 1146667](https://issuetracker.unity3d.com/product/unity/issues/guid/1146667/)

- Fixed an issue that caused specular highlights to disappear when the smoothness value was set to 1.0. [case 1161827](https://issuetracker.unity3d.com/issues/lwrp-hdrp-lit-shader-max-smoothness-value-is-incosistent-between-pipelines)
- Fixed an issue in the Material upgrader that caused transparent Materials to not upgrade correctly to Universal RP. [case 1170419](https://issuetracker.unity3d.com/issues/shader-conversion-upgrading-project-materials-causes-standard-transparent-materials-to-flicker-when-moving-the-camera).
- Fixed post-processing for the 2D Renderer.
- Fixed an issue in Light2D that caused a black line to appear for a 360 degree spotlight.
- Fixed an issue where the Terrain shader generated NaNs.
- Fixed an issue that caused the `Opaque Color` pass to never render at half or quarter resolution.
- Fixed and issue where stencil state on a `ForwardRendererData` was reset each time rendering happened.

2
Packages/com.unity.render-pipelines.universal/Documentation~/2DLightProperties.md


# 2D Lights Properties
# 2D Lights properties
## Creating a Light

21
Packages/com.unity.render-pipelines.universal/Documentation~/2d-index.md


# Overview
The following are 2D related features that utilize the __Universal Render Pipeline__:
When using [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html) (Universal RP) with the __2D Renderer__ selected, the __Light 2D__ component introduces a way to apply 2D optimized lighting to Sprites.
- [2D Lights and Shadows](Lights-2D-intro.md)
- [2D Pixel Perfect](2d-pixelperfect.md)
You can choose from several different light types with the __Light 2D__ component. The light types currently available in the package are:
- [Freeform](LightTypes.html#freeform)
- [Sprite](LightTypes.html#sprite)
- [Parametric](LightTypes.html#parametric)
- [Point](LightTypes.html#point)
- [Global](LightTypes.html#global)
![](images\image_1.png)
The package includes the __2D Renderer Data__ Asset which contains the __Blend Styles__ parameters, and allows you to create up to four custom Light Operations for your Project.
__Note:__ If you have the experimental 2D Renderer enabled (menu: __Graphics Settings__ > add the 2D Renderer Asset under __Scriptable Render Pipeline Settings__), some of the options related to 3D rendering in the Universal RP Asset don't have any impact on your final app or game.

2
Packages/com.unity.render-pipelines.universal/Documentation~/HDREmulationScale.md


## HDR Emulation Scale
## HDR emulation scale
All Lights in the 2D lighting system support HDR. While a typical RGBA32 color channel has the range of zero to one, a HDR channel can go beyond one.

12
Packages/com.unity.render-pipelines.universal/Documentation~/LightBlendStyles.md


__Blend Styles__ determine the way a particular Light interacts with Sprites in the Scene. All Lights in the Scene must pick from one of the available Blend Styles. The Universal RP 2D Asset can currently contain a total of four different Light Blend Styles, starting with the 'Default' Blend Style being available.
| **Property** | **Function** |
| -------------------- | ------------------------------------------------------------ |
| Name | The name that appears when choosing a Blend Style for a Light2D. |
| Mask Texture Channel | Which mask channel to use when applying this Blend Style to a Sprite. |
| Render Texture Scale | Scale for the internal render texture created for this Blend Style. |
| Blend Mode | What blending mode the Light2D uses when this Blend Style is selected. |
| **Property** | **Function** |
| ------------------------ | ------------------------------------------------------------ |
| __Name__ | The name that appears when choosing a Blend Style for a Light2D. |
| __Mask Texture Channel__ | Which mask channel to use when applying this Blend Style to a Sprite. |
| __Render Texture Scale__ | Scale for the internal render texture created for this Blend Style. |
| __Blend Mode__ | What blending mode the Light2D uses when this Blend Style is selected. |

4
Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Channel-Mixer.md


**Channel Mixer** uses the [Volume](Volumes.html) framework, so to enable and modify **Channel Mixer** properties, you must add a **Channel Mixer** override to a [Volume](Volumes.html) in your Scene. To add **Channel Mixer** to a Volume:
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Channel Mixer**. Universal RP now applies **Channel Mixer** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Channel Mixer**. URP now applies **Channel Mixer** to any Camera this Volume affects.
![](Images/Post-processingChannelMixer1.png)
![](Images/Inspectors/ChannelMixer.png)
### Output channels

6
Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Color-Adjustments.md


**Color Adjustments** uses the [Volume](Volumes.html) framework, so to enable and modify **Color Adjustments** properties, you must add a **Color Adjustments** override to a [Volume](Volumes.html) in your Scene. To add **Color Adjustments** to a Volume:
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Color Adjustments**. Universal RP now applies **Color Adjustments** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Color Adjustments**. URP now applies **Color Adjustments** to any Camera this Volume affects.
![](Images/Post-processingColorAdjustments1.png)
![](Images/Inspectors/ColorAdjustments.png)
| **Post Exposure** | Adjusts the overall exposure of the Scene in EV (not EV<sub>100</sub>). Universal RP applies this after the HDR effect and before tonemapping, which means that it does not affect previous effects in the chain. |
| **Post Exposure** | Adjusts the overall exposure of the Scene in EV (not EV<sub>100</sub>). URP applies this after the HDR effect and before tonemapping, which means that it does not affect previous effects in the chain. |
| **Contrast** | Use the slider to expand or shrink the overall range of tonal values. Larger positive values expand the tonal range and lower negative values shrink the tonal range. |
| **Color Filter** | Use the color picker to select which color the Color Adjustment effect should use to multiply the render and tint the result. |
| **Hue Shift** | Use the slider to shift the hue of all colors. |

4
Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Color-Curves.md


**Color Curves** uses the [Volume](Volumes.html) framework, so to enable and modify **Color Curves** properties, you must add a **Color Curves** override to a [Volume](Volumes.html) in your Scene. To add **Color Curves** to a Volume:
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Color Curves**. Universal RP now applies **Color Curves** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Color Curves**. URP now applies **Color Curves** to any Camera this Volume affects.
![](Images/Post-processingColorCurves1.png)
![](Images/Inspectors/ColorCurves.png)
| **Curve** | **Description** |
| -------------- | ------------------------------------------------------------ |

6
Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Film-Grain.md


**Film Grain** uses the [Volume](Volumes.html) framework, so to enable and modify **Film Grain** properties, you must add a **Film Grain** override to a [Volume](Volumes.html) in your Scene. To add **Film Grain** to a Volume:
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Film Grain**. Universal RP now applies **Film Grain** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Film Grain**. URP now applies **Film Grain** to any Camera this Volume affects.
![](Images/Post-processingFilmGrain1.png)
![](Images/Inspectors/FilmGrain.png)
| **Type** | Use the drop-down to select the type of grain to use. You can select from a list of presets that Universal RP includes, or select **Custom** to provide your own grain Texture. |
| **Type** | Use the drop-down to select the type of grain to use. You can select from a list of presets that URP includes, or select **Custom** to provide your own grain Texture. |
| **Texture** | Assign a Texture that this effect uses as a custom grain Texture.This property is only available when **Type** is set to **Custom**. |
| **Intensity** | Use the slider to set the strength of the Film Grain effect. |
| **Response** | Use the slider to set the noisiness response curve. The higher you set this value, the less noise there is in brighter areas. |

4
Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Lens-Distortion.md


**Lens Distortion** uses the [Volume](Volumes.html) framework, so to enable and modify **Lens Distortion** properties, you must add a **Lens Distortion** override to a [Volume](Volumes.html) in your Scene. To add **Lens Distortion** to a Volume:
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Lens Distortion**. Universal RP now applies **Lens Distortion** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Lens Distortion**. URP now applies **Lens Distortion** to any Camera this Volume affects.
![](Images/Post-processingLensDistortion1.png)
![](Images/Inspectors/LensDistortion.png)
| **Property** | **Description** |
| ---------------- | ------------------------------------------------------------ |

10
Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Lift-Gamma-Gain.md


**Lift Gamma Gain** uses the [Volume](Volumes.html) framework, so to enable and modify the lift, gamma, or gain of the render, you must add a **Lift Gamma Gain** override to a [Volume](Volumes.html) in your Scene. To add **Lift Gamma Gain** to a Volume:
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Lift Gamma Gain**. Universal RP now applies **Lift Gamma Gain** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Lift Gamma Gain**. URP now applies **Lift Gamma Gain** to any Camera this Volume affects.
![](Images/Post-processingLiftGammaGain1.png)
![](Images/Inspectors/LiftGammaGain.png)
| **Lift** | Use this to control the dark tones. This has a more exaggerated effect on shadows.<br>&#8226; Use the trackball to select which color Universal RP should shift the hue of the dark tones to.<br/>&#8226;Use the slider to offset the color lightness of the trackball color. |
| **Gamma** | Use this to control the mid-range tones with a power function.<br/>&#8226; Use the trackball to select which color Universal RP should use to shift the hue of the mid-tones to.<br/>&#8226; Use the slider to offset the color lightness of the trackball color. |
| **Gain** | Use this to increase the signal and make highlights brighter.<br/>&#8226; Use the trackball to select which color that Universal RP uses to shift the hue of the highlights to.<br/>&#8226; Use the slider to offset the color lightness of the trackball color. |
| **Lift** | Use this to control the dark tones. This has a more exaggerated effect on shadows.<br>&#8226; Use the trackball to select which color URP should shift the hue of the dark tones to.<br/>&#8226;Use the slider to offset the color lightness of the trackball color. |
| **Gamma** | Use this to control the mid-range tones with a power function.<br/>&#8226; Use the trackball to select which color URP should use to shift the hue of the mid-tones to.<br/>&#8226; Use the slider to offset the color lightness of the trackball color. |
| **Gain** | Use this to increase the signal and make highlights brighter.<br/>&#8226; Use the trackball to select which color that URP uses to shift the hue of the highlights to.<br/>&#8226; Use the slider to offset the color lightness of the trackball color. |

4
Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Panini-Projection.md


**Panini Projection** uses the [Volume](Volumes.html) framework, so to enable and modify **Panini Projection** properties, you must add a **Panini Projection** override to a [Volume](Volumes.html) in your Scene. To add **Panini Projection** to a Volume:
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Panini Projection**. Universal RP now applies **Panini Projection** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Panini Projection**. URP now applies **Panini Projection** to any Camera this Volume affects.
![](Images/Post-processingPaniniProjection1.png)
![](Images/Inspectors/PaniniProjection.png)
| **Property** | **Description** |
| --------------- | ------------------------------------------------------------ |

10
Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Shadows-Midtones-Highlights.md


**Shadows Midtones Highlights** uses the [Volume](Volumes.html) framework, so to enable and modify the shadows, midtones, or highlights of the render, you must add a **Shadows Midtones Highlights** override to a [Volume](Volumes.html) in your Scene. To add **Shadows Midtones Highlights** to a Volume:
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Shadows Midtones Highlights**. Universal RP now applies **Shadows Midtones Highlights** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Shadows Midtones Highlights**. URP now applies **Shadows Midtones Highlights** to any Camera this Volume affects.
![](Images/Post-processingShadowsMidtonesHighlights1.png)
![](Images/Inspectors/ShadowsMidtonesHighlights.png)
| **Shadows** | Use this to control the shadows.Use the trackball to select the color Universal RP should shift the hue of the shadows to.Use the slider to offset the color lightness of the trackball color. |
| **Midtones** | Use this to control the midtones.Use the trackball to select the color Universal RP should shift the hue of the midtones to.Use the slider to offset the color lightness of the trackball color. |
| **Highlights** | Use this to control the highlights.Use the trackball to select the color Universal RP should shift the hue of the highlights to.Use the slider to offset the color lightness of the trackball color. |
| **Shadows** | Use this to control the shadows.Use the trackball to select the color URP should shift the hue of the shadows to.Use the slider to offset the color lightness of the trackball color. |
| **Midtones** | Use this to control the midtones.Use the trackball to select the color URP should shift the hue of the midtones to.Use the slider to offset the color lightness of the trackball color. |
| **Highlights** | Use this to control the highlights.Use the trackball to select the color URP should shift the hue of the highlights to.Use the slider to offset the color lightness of the trackball color. |
### Graph view

8
Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-Split-Toning.md


**Split Toning** uses the [Volume](Volumes.html) framework, so to enable and modify **Split Toning** properties, you must add a **Split Toning** override to a [Volume](Volumes.html) in your Scene. To add **Split Toning** to a Volume:
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Split Toning**. Universal RP now applies **Split Toning** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **Split Toning**. URP now applies **Split Toning** to any Camera this Volume affects.
![](Images/Post-processingSplitToning1.png)
![](Images/Inspectors/SplitToning.png)
| **Shadows** | Use the color picker to select the color that Universal RP uses for tinting shadows. |
| **Highlights** | Use the color picker to select the color that Universal RP uses for tinting highlights. |
| **Shadows** | Use the color picker to select the color that URP uses for tinting shadows. |
| **Highlights** | Use the color picker to select the color that URP uses for tinting highlights. |
| **Balance** | Use the slider to set the balance between **Shadows** and **Highlights**. Lower values result in more pronounced shadow toning is compared to highlight toning. Higher values result in the opposite effect, with more pronounced highlight toning compared to shadow toning. |

4
Packages/com.unity.render-pipelines.universal/Documentation~/Post-Processing-White-Balance.md


**White Balance** uses the [Volume](Volumes.html) framework, so to enable and modify **White Balance** properties, you must add a **White Balance** override to a [Volume](Volumes.html) in your Scene. To add **White Balance** to a Volume:
1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **White Balance**. Universal RP now applies **White Balance** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing** and click on **White Balance**. URP now applies **White Balance** to any Camera this Volume affects.
![](Images/Post-processingWhiteBalance1.png)
![](Images/Inspectors/WhiteBalance.png)
| **Property** | **Description** |
| --------------- | ------------------------------------------------------------ |

17
Packages/com.unity.render-pipelines.universal/Documentation~/Setup.md


# Requirements and Set-up of materials and Shader
# Requirements and setup
Install the following Editor and package versions to work with the 2D Renderer:
## Required Installations
- __Unity 2019.2.0b1__ or later
- __Unity 2019.2.0b1__ or later
## Configuring the 2D Renderer

2. Create a new __2D Renderer__ by going to the Assets menu and selecting __Create > Rendering > Universal Render Pipeline > 2D Renderer__
![](images\image_3.png)
2. Create a new __2D Renderer__ by going to the Assets menu and selecting __Create > Rendering > Universal Render Pipeline > 2D Renderer__![](images\image_3.png)
4. Drag the __2D Renderer__ Asset onto the Data box, or select the circle icon to the right of the box to open the __Select Object__ window, then select the __2D Renderer__ Asset from the list.
![](images\image_4.png)
4. Drag the __2D Renderer__ Asset onto the Data box, or select the circle icon to the right of the box to open the __Select Object__ window, then select the __2D Renderer__ Asset from the list.![](images\image_4.png)
5. Go to __Edit > Project Settings__, and select the __Graphics__ category. Set the __Scriptable Render Pipeline Settings __to your created __Pipeline Asset __by dragging the Asset directly onto the box, or by selecting the circle icon to the right of the box to open the __Select Object__ window and selecting the Asset from the list.

**Note:** If you have the experimental 2D Renderer enabled, some of the options related to 3D rendering in the Universal RP Asset don't have any impact on your final app or game.
**Note:** If you have the experimental 2D Renderer enabled, some of the options related to 3D rendering in the Universal RP Asset will not have any impact on your final app or game.

2
Packages/com.unity.render-pipelines.universal/Documentation~/ShaderGraph.md


# Working with Shader Graph
# 2D Renderer and Shader Graph
## Creating a Lit Shader

55
Packages/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md


* [About Universal RP](index.md)
* [Getting started](getting-started-with-universalrp.md)
* [Creating a new Project](creating-a-new-project-with-universalrp.md)
* [Upgrading your existing Project](installing-universalrp-into-an-existing-project.md)
* [Configuring Universal RP for use](configuring-universalrp-for-use.md)
* [Inside Universal RP](inside-universalrp.md)
* [The Universal RP Asset](universalrp-asset.md)
* [Shader stripping](shader-stripping.md)
* [Built-in/Universal RP comparison](universalrp-builtin-feature-comparison.md)
* [Shading Models in Universal RP](shading-model.md)
* [Rendering in Universal RP](rendering-in-universalrp.md)
* [Post-processing in Universal RP](integration-with-post-processing.md)
* Effect List
* [Universal Render Pipeline](index.md)
* [Install and configure](InstallingAndConfiguringURP.md)
* [Create a Project from a Template](CreateNewProjectFromTemplate.md)
* [Install into a Project](InstallURPIntoAProject.md)
* [The Universal Render Pipeline Asset](universalrp-asset.md)
* [Rendering](rendering-in-universalrp.md)
* [Post-processing](integration-with-post-processing.md)
* [Volumes](Volumes.md)
* [Volume Profile](VolumeProfile.md)
* [Volume Overrides](VolumeOverrides.md)
* [Effect List](EffectList.md)
* [Channel Mixer](Post-Processing-Channel-Mixer.md)
* [Color Adjustments](Post-Processing-Color-Adjustments.md)
* [Color Curves](Post-Processing-Color-Curves.md)

* [Motion Blur](Post-Processing-Motion-Blur.md)
* [Shaders in Universal RP](shaders-in-universalrp.md)
* [Shaders and Materials](shaders-in-universalrp.md)
* [Shading Models](shading-model.md)
* [Lit](lit-shader.md)
* [Simple Lit](simple-lit-shader.md)
* [Baked Lit](baked-lit-shader.md)

* [Particles Unlit](particles-unlit-shader.md)
* [Upgrading shaders](upgrading-your-shaders.md)
* [Upgrading shaders from Built-in](upgrading-your-shaders.md)
* [Shader stripping](shader-stripping.md)
* [Introduction to Lights 2D](Lights-2D-intro.md)
* [2D Lights Properties](2DLightProperties.md)
* [Light Types](LightTypes.md)
* [Lights 2D properties](2DLightProperties.md)
* [Light types](LightTypes.md)
* [HDR Emulation Scale](HDREmulationScale.md)
* [HDR emulation scale](HDREmulationScale.md)
* [2D Shadows](2DShadows.md)
* [2D with Shader Graph](ShaderGraph.md)
* [2D Shadows](2DShadows.md)
* [2D Renderer and Shader Graph](ShaderGraph.md)
* [2D Pixel Perfect](2d-pixelperfect.md)
* [Cinemachine Pixel Perfect extension](pixel-cinemachine.md)
* [Feature Comparison with Built-in](universalrp-builtin-feature-comparison.md)

13
Packages/com.unity.render-pipelines.universal/Documentation~/index.md


![Universal Render Pipeline in action](Images/AssetShots/Beauty/Overview.png)
The Universal Render Pipeline (Universal RP) is a prebuilt Scriptable Render Pipeline, made by Unity. The technology offers graphics that are scalable to mobile platforms, and you can also use it for higher-end consoles and PCs. You’re able to achieve quick rendering at a high quality without needing compute shader technology. Universal RP uses simplified, physically based Lighting and Materials.
The Universal Render Pipeline (URP) is a prebuilt Scriptable Render Pipeline, made by Unity. The technology offers graphics that are scalable to mobile platforms, and you can also use it for higher-end consoles and PCs. You’re able to achieve quick rendering at a high quality without needing compute shader technology. URP uses simplified, physically based Lighting and Materials.
The Universal RP uses single-pass forward rendering. Use this pipeline to get optimized real-time performance on several platforms.
The URP uses single-pass forward rendering. Use this pipeline to get optimized real-time performance on several platforms.
The Universal RP is supported on the following platforms:
The URP is supported on the following platforms:
* Windows and UWP
* Mac and iOS
* Android

* WebGL
The Universal Render Pipeline is available via two templates: Universal RP and Universal RP-VR. The Universal RP-VR comes with pre-enabled settings specifically for VR. The documentation for both render pipelines is the same. For any questions regarding Universal RP-VR, see the Universal RP documentation.
The Universal Render Pipeline is available via two templates: URP and URP-VR. The URP-VR comes with pre-enabled settings specifically for VR. The documentation for both render pipelines is the same. For any questions regarding URP-VR, see the URP documentation.
**Note:** Built-in and custom Lit Shaders do not work with the Universal Render Pipeline. Instead, Universal RP has a new set of standard shaders. If you upgrade a current Project to Universal RP, you can upgrade built-in shaders to the new ones.
**Note:** Built-in and custom Lit Shaders do not work with the Universal Render Pipeline. Instead, URP has a new set of standard Shaders. If you upgrade a Project from the Built-in render pipeline to URP, you can [upgrade Built-in Shaders to the URP ones](upgrading-your-shaders.md).
**Note:** Projects made using Universal RP are not compatible with the High Definition Render Pipeline or the built-in Unity rendering pipeline. Before you start development, you must decide which render pipeline to use in your Project.
**Note:** Projects made using URP are not compatible with the High Definition Render Pipeline or the Built-in Unity render¢pipeline. Before you start development, you must decide which render pipeline to use in your Project.

10
Packages/com.unity.render-pipelines.universal/Documentation~/integration-with-post-processing.md


# Post-processing in the Universal Render Pipeline
The Universal Render Pipeline (Universal RP) includes its own implementation of [post-processing](https://docs.unity3d.com/Manual/PostProcessingOverview.html), so you do not need to install any other package. Universal RP is not compatible with the post-processing version 2 package.
The Universal Render Pipeline (URP) includes its own implementation of [post-processing](https://docs.unity3d.com/Manual/PostProcessingOverview.html), so you do not need to install any other package. URP is not compatible with the post-processing version 2 package.
The images below show a Scene with and without Universal RP post-processing.
The images below show a Scene with and without URP post-processing.
Without post-processing:

![](Images/AssetShots/Beauty/SceneWithPost.png)
## Post-processing in Universal RP for mobile devices
## Post-processing in URP for mobile devices
Post-processing effects can take up a lot of frame time. If you’re using Universal RP for mobile devices, these effects are the most “mobile-friendly” by default:
Post-processing effects can take up a lot of frame time. If you’re using URP for mobile devices, these effects are the most “mobile-friendly” by default:
- Bloom (with __High Quality Filtering__ disabled)
- Chromatic Aberration

**Note:** For anti-aliasing on mobile platforms, Unity recommends that you use FXAA.
## Post-processing in Universal RP for VR
## Post-processing in URP for VR
In VR apps and games, certain post-processing effects can cause nausea and disorientation. To reduce motion sickness in fast-paced or high-speed apps, use the Vignette effect for VR, and avoid the effects Lens Distortion, Chromatic Aberration, and Motion Blur for VR.

12
Packages/com.unity.render-pipelines.universal/Documentation~/rendering-in-universalrp.md


#Rendering in the Universal Render Pipeline
The Universal Render Pipeline (Universal RP) renders Scenes using the:
The Universal Render Pipeline (URP) renders Scenes using the:
- [Shading models](shading-model.md) for shaders shipped with Universal RP
- [Shading models](shading-model.md) for shaders shipped with URP
In the Forward renderer, Universal RP implements a rendering loop that tells Unity how to render a frame.
In the Forward renderer, URP implements a rendering loop that tells Unity how to render a frame.

When the [render pipeline is active in Graphics Settings](configuring-universalrp-for-use.md), Unity uses Universal RP to render all Cameras in your Project, including game and Scene view cameras, Reflection Probes, and the preview windows in your Inspectors.
When the [render pipeline is active in Graphics Settings](configuring-universalrp-for-use.md), Unity uses URP to render all Cameras in your Project, including game and Scene view cameras, Reflection Probes, and the preview windows in your Inspectors.
The Universal RP renderer executes a Camera loop for each Camera, which performs the following steps:
The URP renderer executes a Camera loop for each Camera, which performs the following steps:
1. Culls rendered objects in your Scene
2. Builds data for the renderer

| ---------------------------- | ------------------------------------------------------------ |
| __Setup Culling Parameters__ | Configures parameters that determine how the culling system culls Lights and shadows. You can override this part of the render pipeline with a custom renderer. |
| __Culling__ | Uses the culling parameters from the previous step to compute a list of visible renderers, shadow casters, and Lights that are visible to the Camera. Culling parameters and Camera [layer distances](https://docs.unity3d.com/ScriptReference/Camera-layerCullDistances.html) affect culling and rendering performance. |
| __Build Rendering Data__ | Catches information based on the culling output, quality settings from the [Universal RP Asset](universalrp-asset.md), [Camera](camera.md), and the current running platform to build the `RenderingData`. The rendering data tells the renderer the amount of rendering work and quality required for the Camera and the currently chosen platform. |
| __Build Rendering Data__ | Catches information based on the culling output, quality settings from the [URP Asset](universalrp-asset.md), [Camera](camera.md), and the current running platform to build the `RenderingData`. The rendering data tells the renderer the amount of rendering work and quality required for the Camera and the currently chosen platform. |
| __Setup Renderer__ | Builds a list of render passes, and queues them for execution according to the rendering data. You can override this part of the render pipeline with a custom renderer. |
| __Execute Renderer__ | Executes each render pass in the queue. The renderer outputs the Camera image to the framebuffer. |

9
Packages/com.unity.render-pipelines.universal/Documentation~/shader-stripping.md


# Shader Stripping
Unity compiles many Shader Variants from a single Shader source file. The number of Shader Variants depends on how many keywords you’ve included in the Shader. In the default Shaders, the Universal Render Pipeline (Universal RP) uses a set of keywords for lighting and shadows. Universal RP can exclude some Shader variants, depending on which features are active in the [Universal RP Asset](universalrp-asset.md).
Unity compiles many Shader Variants from a single Shader source file. The number of Shader Variants depends on how many keywords you’ve included in the Shader. In the default Shaders, the Universal Render Pipeline (URP) uses a set of keywords for lighting and shadows. URP can exclude some Shader variants, depending on which features are active in the [URP Asset](universalrp-asset.md).
When you disable [certain features](shader-stripping-keywords.md) in the URP Asset, the pipeline “strips” the related Shader variants from the build. Stripping your Shaders gives you smaller build sizes and shorter build times. This is useful if your project is never going to use certain features or keywords.
When you disable [certain features](shader-stripping-keywords.md) in the Universal RP Asset, the pipeline “strips” the related Shader variants from the build. Stripping your Shaders gives you smaller build sizes and shorter build times. This is useful if your project is never going to use certain features or keywords.
For example, you might have a project where you never use shadows for directional lights. Without Shader stripping, Shader variants with directional shadow support remain in the build. If you know you won't use these shadows at all, you can uncheck **Cast Shadows** in the URP Asset for main or additional direction lights. URP then strips these Shader Variants from the build.
For example, you might have a project where you never use shadows for directional lights. Without Shader stripping, Shader variants with directional shadow support remain in the build. If you know you won't use these shadows at all, you can uncheck **Cast Shadows** in the Universal RP Asset for main or additional direction lights. Universal RP then strips these Shader Variants from the build.
For more information about stripping Shader Variants in Unity, see [this blog post by Christophe Riccio](https://blogs.unity3d.com/2018/05/14/stripping-scriptable-shader-variants/).
For more information about stripping Shader Variants in Unity, see [this blog post by Christophe Riccio](https://blogs.unity3d.com/2018/05/14/stripping-scriptable-shader-variants/).

10
Packages/com.unity.render-pipelines.universal/Documentation~/shaders-in-universalrp.md


# Shaders in Universal RP
# Shaders and Materials
The Universal Render Pipeline uses a different shading approach than the Unity built-in Render Pipeline. As a result, built-in Lit and custom Lit Shaders do not work with the Universal RP. Instead, Universal RP has a new set of standard Shaders. Universal RP provides the following Shaders for the most common use case scenarios:
The Universal Render Pipeline uses a different shading approach than the Unity built-in Render Pipeline. As a result, built-in Lit and custom Lit Shaders do not work with the URP. Instead, URP has a new set of standard Shaders. URP provides the following Shaders for the most common use case scenarios:
- [Lit](lit-shader.md)
- [Simple Lit](simple-lit-shader.md)

- Autodesk Interactive Transparent
- Autodesk Interactive Masked
**Upgrade advice:** If you upgrade your current Project to Universal RP, you can [upgrade](upgrading-your-shaders.md) built-in Shaders to the new ones. Unlit Shaders from the built-in render pipeline still work with Universal RP.
**Upgrade advice:** If you upgrade your current Project to URP, you can [upgrade](upgrading-your-shaders.md) built-in Shaders to the new ones. Unlit Shaders from the built-in render pipeline still work with URP.
**Note:** Unlit Shaders from the Unity built-in render pipeline work in Universal RP.
**Note:** Unlit Shaders from the Unity built-in render pipeline work in URP.

For PBS, use the [Lit Shader](lit-shader.md). You can use it on all platforms. The Shader quality scales, depending on the platform, but keeps physically based rendering on all platforms. This gives you realistic graphics across hardware. The Unity [Standard Shader](<https://docs.unity3d.com/Manual/shader-StandardShader.html>) and the [Standard (Specular setup)](https://docs.unity3d.com/Manual/StandardShaderMetallicVsSpecular.html) Shaders both map to the Lit Shader in Universal RP. For a list of Shader mappings, see [Shader mappings under Upgradring your Shaders.](upgrading-your-shaders.md#shaderMappings)
For PBS, use the [Lit Shader](lit-shader.md). You can use it on all platforms. The Shader quality scales, depending on the platform, but keeps physically based rendering on all platforms. This gives you realistic graphics across hardware. The Unity [Standard Shader](<https://docs.unity3d.com/Manual/shader-StandardShader.html>) and the [Standard (Specular setup)](https://docs.unity3d.com/Manual/StandardShaderMetallicVsSpecular.html) Shaders both map to the Lit Shader in URP. For a list of Shader mappings, see [Shader mappings under Upgradring your Shaders.](upgrading-your-shaders.md#shaderMappings)
If you’re targeting less powerful devices, or just would like simpler shading, use the [Simple Lit Shader](simple-lit-shader.md), which is non-PBR.

14
Packages/com.unity.render-pipelines.universal/Documentation~/shading-model.md


# Shading models in Universal Render Pipeline
A shading model defines how a Material’s color varies depending on factors such as surface orientation, viewer direction, and lighting. Your choice of a shading model depends on the artistic direction and performance budget of your application. Universal Render Pipeline (Universal RP) provides Shaders with the following shading models:
A shading model defines how a Material’s color varies depending on factors such as surface orientation, viewer direction, and lighting. Your choice of a shading model depends on the artistic direction and performance budget of your application. Universal Render Pipeline (URP) provides Shaders with the following shading models:
- [Physically Based Shading](#physically-based-shading)
- [Simple Shading](#simple-shading)

This PBS model follows two principles:
_Energy conservation_ - Surfaces never reflect more light than the total incoming light. The only exception to this is when an object emits light. For example, a neon sign.
_Microgeometry_ - Surfaces have geometry at a microscopic level. Some objects have smooth microgeometry, which gives them a mirror-like appearance. Other objects have rough microgeometry, which makes them look more dull. In Universal RP, you can mimic the level of smoothness of a rendered object’s surface.
_Microgeometry_ - Surfaces have geometry at a microscopic level. Some objects have smooth microgeometry, which gives them a mirror-like appearance. Other objects have rough microgeometry, which makes them look more dull. In URP, you can mimic the level of smoothness of a rendered object’s surface.
When light hits a a rendered object's surface, part of the light is reflected and part is refracted. The reflected light is called _specular reflection_. This varies depending on the camera direction and the point at which the light hits a surface, also called the [angle of incidence](<https://en.wikipedia.org/wiki/Angle_of_incidence_(optics)>). In this shading model, the shape of specular highlight is approximated with a [GGX function](https://blogs.unity3d.com/2016/01/25/ggx-in-unity-5-3/).

The following Universal RP Shaders use Physically Based Shading:
The following URP Shaders use Physically Based Shading:
- [Lit](lit-shader.md)
- [Particles Lit](particles-lit-shader.md)

Light attenuation is only affected by the light intensity.
The following Universal RP Shaders use Simple Shading:
The following URP Shaders use Simple Shading:
- [Simple Lit](simple-lit-shader.md)
- [Particles Simple Lit](particles-simple-lit-shader.md)

The Baked Lit shading model doesn’t have real-time lighting. Materials can receive [baked lighting](https://docs.unity3d.com/Manual/LightMode-Baked.html) from either [lightmaps](https://docs.unity3d.com/Manual/Lightmapping.html) or [Light Probes](<https://docs.unity3d.com/Manual/LightProbes.html>). This adds some depth to your Scenes at a small performance cost. Games with this shading model can run on less powerful platforms.
The Universal RP Baked Lit shader is the only shader that uses the Baked Lit shading model.
The URP Baked Lit shader is the only shader that uses the Baked Lit shading model.
Universal RP comes with some Shaders that are Unlit. This means that they have no directional lights and no baked lighting. Because there are no light calculations, these shaders compile faster than Shaders with lighting. If you know in advance that your GameObject or visual doesn’t need lighting, choose an Unlit shader to save calculation and build time in your final product.
URP comes with some Shaders that are Unlit. This means that they have no directional lights and no baked lighting. Because there are no light calculations, these shaders compile faster than Shaders with lighting. If you know in advance that your GameObject or visual doesn’t need lighting, choose an Unlit shader to save calculation and build time in your final product.
The following Universal RP Shaders have no lighting:
The following URP Shaders have no lighting:
- [Unlit](unlit-shader.md)
- [Particles Unlit](particles-unlit-shader.md)

14
Packages/com.unity.render-pipelines.universal/Documentation~/simple-lit-shader.md


| Property | Description |
| ------------------ | ------------------------------------------------------------ |
| __Surface Type__ | Use this drop-down to apply an __Opaque__ or __Transparent__ surface type to the Material. This determines which render pass Universal RP renders the material in. __Opaque__ surface types are always fully visible, regardless of what’s behind them. Universal RP renders opaque Materials first. __Transparent__ surface types are affected by their background, and they can vary according to which type of transparent surface type you choose. Universal RP renders transparent Materials in a separate pass after opaque objects. If you select __Transparent__, the __Blending Mode__ drop-down appears. |
| __Blending Mode__ | Use this drop-down to determine how Universal RP calculates the color of each pixel of the transparent Material by blending the Material with the background pixels.<br/>__Alpha__ uses the Material’s alpha value to change how transparent an object is. 0 is fully transparent. 1 appears fully opaque, but the Material is still rendered during the Transparent render pass. This is useful for visuals that you want to be fully visible but to also fade over time, like clouds.<br/>__Premultiply__ applies a similar effect to the Material as __Alpha__, but preserves reflections and highlights, even when your surface is transparent. This means that only the reflected light is visible. For example, imagine transparent glass.<br/>__Additive__ adds an extra layer to the Material, on top of another surface. This is good for holograms. <br/>__Multiply__ multiplies the color of the Material with the color behind the surface. This creates a darker effect, like when you look through colored glass. |
| __Render Face__ | Use this drop-down to determine which sides of your geometry to render.<br/>__Front Face__ renders the front face of your geometry and [culls](https://docs.unity3d.com/Manual/SL-CullAndDepth.html) the back face. This is the default setting. <br/>__Back Face__ renders the front face of your geometry and culls the front face. <br/>__Both__ makes Universal RP render both faces of the geometry. This is good for small, flat objects, like leaves, where you might want both sides visible. |
| __Alpha Clipping__ | Makes your Material act like a [Cutout](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterRenderingMode.html) Shader. Use this to create a transparent effect with hard edges between the opaque and transparent areas. For example, to create blades of grass. To achieve this effect, Universal RP does not render alpha values below the specified __Threshold__, which appears when you enable __Alpha Clipping__. You can set the __Threshold__ by moving the slider, which accepts values from 0 to 1. All values above your threshold are fully opaque, and all values below your threshold are invisible. For example, a threshold of 0.1 means that Universal RP doesn't render alpha values below 0.1. The default value is 0.5. |
| __Surface Type__ | Use this drop-down to apply an __Opaque__ or __Transparent__ surface type to the Material. This determines which render pass URP renders the material in. __Opaque__ surface types are always fully visible, regardless of what’s behind them. URP renders opaque Materials first. __Transparent__ surface types are affected by their background, and they can vary according to which type of transparent surface type you choose. URP renders transparent Materials in a separate pass after opaque objects. If you select __Transparent__, the __Blending Mode__ drop-down appears. |
| __Blending Mode__ | Use this drop-down to determine how URP calculates the color of each pixel of the transparent Material by blending the Material with the background pixels.<br/>__Alpha__ uses the Material’s alpha value to change how transparent an object is. 0 is fully transparent. 1 appears fully opaque, but the Material is still rendered during the Transparent render pass. This is useful for visuals that you want to be fully visible but to also fade over time, like clouds.<br/>__Premultiply__ applies a similar effect to the Material as __Alpha__, but preserves reflections and highlights, even when your surface is transparent. This means that only the reflected light is visible. For example, imagine transparent glass.<br/>__Additive__ adds an extra layer to the Material, on top of another surface. This is good for holograms. <br/>__Multiply__ multiplies the color of the Material with the color behind the surface. This creates a darker effect, like when you look through colored glass. |
| __Render Face__ | Use this drop-down to determine which sides of your geometry to render.<br/>__Front Face__ renders the front face of your geometry and [culls](https://docs.unity3d.com/Manual/SL-CullAndDepth.html) the back face. This is the default setting. <br/>__Back Face__ renders the front face of your geometry and culls the front face. <br/>__Both__ makes URP render both faces of the geometry. This is good for small, flat objects, like leaves, where you might want both sides visible. |
| __Alpha Clipping__ | Makes your Material act like a [Cutout](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterRenderingMode.html) Shader. Use this to create a transparent effect with hard edges between the opaque and transparent areas. For example, to create blades of grass. To achieve this effect, URP does not render alpha values below the specified __Threshold__, which appears when you enable __Alpha Clipping__. You can set the __Threshold__ by moving the slider, which accepts values from 0 to 1. All values above your threshold are fully opaque, and all values below your threshold are invisible. For example, a threshold of 0.1 means that URP doesn't render alpha values below 0.1. The default value is 0.5. |

| __Base Map__ | Adds color to the surface, also known as the diffuse map. To assign a Texture to the __Base Map__ setting, click the object picker next to it. This opens the Asset Browser, where you can select from the Textures in your Project. Alternatively, you can use the [color picker](https://docs.unity3d.com/Manual/EditingValueProperties.html). The color next to the setting shows the tint on top of your assigned Texture. To assign another tint, you can click this color swatch. If you select __Transparent__ or __Alpha Clipping__ under __Surface Options__, your Material uses the Texture’s alpha channel or color. |
| __Specular Map__ | Controls the color of your specular highlights from direct lighting, for example [Directional, Point, and Spot lights](https://docs.unity3d.com/Manual/Lighting.html). To assign a Texture to the __Specular Map__ setting, click the object picker next to it. This opens the Asset Browser, where you can select from the textures in your Project. Alternatively, you can use the [color picker](https://docs.unity3d.com/Manual/EditingValueProperties.html). <br/>In __Source__, you can select a Texture in your Project to act as a source for the smoothness. By default, the source is the Alpha channel for this Texture. <br/>You can use the __Smoothness__ slider to control the spread of highlights on the surface. 0 gives a wide, rough highlight. 1 gives a small, sharp highlight like glass. Values in between produce semi-glossy looks. For example, 0.5 produces a plastic-like glossiness. |
| __Normal Map__ | Adds a normal map to the surface. With a [normal map](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterNormalMap.html?), you can add surface details like bumps, scratches and grooves. To add the map, click the object picker next to it. The normal map picks up ambient lighting in the environment. |
| __Emission__ | Makes the surface look like it emits lights. When enabled, the __Emission Map__ and __Emission Color__ settings appear.<br/>To assign an __Emission Map__, click the object picture next to it. This opens the Asset Browser, where you can select from the textures in your Project.<br/>For __Emission Color__, you can choose the color picker](https://docs.unity3d.com/Manual/EditingValueProperties.html) to assign a tint on top of the color. This can be more than 100% white, which is useful for effects like lava, that shines brighter than white while still being another color.<br/>If you have not assigned an __Emission Map__, the __Emission__ setting only uses the tint you’ve assigned in __Emission Color__.<br/>If you do not enable __Emission__, Universal RP sets the emission to black and does not calculate emission. |
| __Emission__ | Makes the surface look like it emits lights. When enabled, the __Emission Map__ and __Emission Color__ settings appear.<br/>To assign an __Emission Map__, click the object picture next to it. This opens the Asset Browser, where you can select from the textures in your Project.<br/>For __Emission Color__, you can choose the color picker](https://docs.unity3d.com/Manual/EditingValueProperties.html) to assign a tint on top of the color. This can be more than 100% white, which is useful for effects like lava, that shines brighter than white while still being another color.<br/>If you have not assigned an __Emission Map__, the __Emission__ setting only uses the tint you’ve assigned in __Emission Color__.<br/>If you do not enable __Emission__, URP sets the emission to black and does not calculate emission. |
| __Tiling__ | A 2D multiplier value that scales the Texture to fit across a mesh according to the U and V axes. This is good for surfaces like floors and walls. The default value is 1, which means no scaling. Set a higher value to make the Texture repeat across your mesh. Set a lower value to stretch the Texture. Try different values until you reach your desired effect. |
| __Offset__ | The 2D offset that positions the Texture on the mesh. To adjust the position on your mesh, move the Texture across the U or V axes. |

| Property | Description |
| ------------------------- | ------------------------------------------------------------ |
| __Enable GPU Instancing__ | Makes Universal RP render meshes with the same geometry and Material in one batch, when possible. This makes rendering faster. Universal RP cannot render Meshes in one batch if they have different Materials or if the hardware does not support GPU instancing. |
| __Priority__ | Use this slider to determine the chronological rendering order for a Material. Universal RP renders Materials with higher values first. You can use this to reduce overdraw on devices by making the pipeline render Materials in front of other Materials first, so it doesn't have to render overlapping areas twice. This works similarly to the [render queue](https://docs.unity3d.com/ScriptReference/Material-renderQueue.html) in the built-in Unity render pipeline. |
| __Enable GPU Instancing__ | Makes URP render meshes with the same geometry and Material in one batch, when possible. This makes rendering faster. URP cannot render Meshes in one batch if they have different Materials or if the hardware does not support GPU instancing. |
| __Priority__ | Use this slider to determine the chronological rendering order for a Material. URP renders Materials with higher values first. You can use this to reduce overdraw on devices by making the pipeline render Materials in front of other Materials first, so it doesn't have to render overlapping areas twice. This works similarly to the [render queue](https://docs.unity3d.com/ScriptReference/Material-renderQueue.html) in the built-in Unity render pipeline. |

10
Packages/com.unity.render-pipelines.universal/Documentation~/speedtree.md


# SpeedTree Shaders in Universal RP
# SpeedTree Shaders
When you use SpeedTree Shaders in Universal RP, keep the following in mind:
When you use SpeedTree Shaders in URP, keep the following in mind:
* There is no Global Illumination on trees in Universal RP.
* There is no Global Illumination on trees in URP.
* Trees cannot receive shadows in Universal RP.
* In Universal RP, you can configure whether lights should be per vertex of per pixel in the [Universal RP Asset](universalrp-asset.md).
* Trees cannot receive shadows in URP.
* In URP, you can configure whether lights should be per vertex of per pixel in the [URP Asset](universalrp-asset.md).

22
Packages/com.unity.render-pipelines.universal/Documentation~/universalrp-asset.md


# Universal Render Pipeline Asset
To use the Universal Render Pipeline (Universal RP), you have to [create a Universal RP Asset and assign the asset in the Graphics settings](configuring-universalrp-for-use.md).
To use the Universal Render Pipeline (URP), you have to [create a URP Asset and assign the asset in the Graphics settings](configuring-universalrp-for-use.md).
The Universal RP Asset controls several graphical features and quality settings for the Universal Render Pipeline. It is a scriptable object that inherits from ‘RenderPipelineAsset’. When you assign the asset in the Graphics settings, Unity switches from the built-in render pipeline to the Universal RP. You can then adjust the corresponding settings directly in the Universal RP, instead of looking for them elsewhere.
The URP Asset controls several graphical features and quality settings for the Universal Render Pipeline. It is a scriptable object that inherits from ‘RenderPipelineAsset’. When you assign the asset in the Graphics settings, Unity switches from the built-in render pipeline to the URP. You can then adjust the corresponding settings directly in the URP, instead of looking for them elsewhere.
You can have multiple Universal RP assets and switch between them. For example, you can have one with Shadows on and one with Shadows off. If you switch between the assets to see the effects, you don’t have to manually toggle the corresponding settings for shadows every time. You cannot, however, switch between HDRP/SRP and Universal RP assets, as the
You can have multiple URP assets and switch between them. For example, you can have one with Shadows on and one with Shadows off. If you switch between the assets to see the effects, you don’t have to manually toggle the corresponding settings for shadows every time. You cannot, however, switch between HDRP/SRP and URP assets, as the
In the Universal RP, you can configure settings for:
In the URP, you can configure settings for:
- [__General__](#general)
- [__Quality__](#quality)

**Note:** If you have the experimental 2D Renderer enabled (menu: **Graphics Settings** > add the 2D Renderer Asset under **Scriptable Render Pipeline Settings**), some of the options related to 3D rendering in the Universal RP Asset don't have any impact on your final app or game.
**Note:** If you have the experimental 2D Renderer enabled (menu: **Graphics Settings** > add the 2D Renderer Asset under **Scriptable Render Pipeline Settings**), some of the options related to 3D rendering in the URP Asset don't have any impact on your final app or game.

| __Property__ | __Description__ |
| ----------------------- | ------------------------------------------------------------ |
| __Depth Texture__ | Enables Universal RP to create a `_CameraDepthTexture`. Universal RP then uses this [depth texture](https://docs.unity3d.com/Manual/SL-DepthTextures.html) by default for all Cameras in your Scene. You can override this for individual cameras in the [Camera Inspector](camera-inspector.md). |
| __Opaque Texture__ | Enable this to create a `_CameraOpaqueTexture` as default for all cameras in your Scene. This works like the [GrabPass](https://docs.unity3d.com/Manual/SL-GrabPass.html) in the built-in render pipeline. The __Opaque Texture__ provides a snapshot of the scene right before Universal RP renders any transparent meshes. You can use this in transparent Shaders to create effects like frosted glass, water refraction, or heat waves. You can override this for individual cameras in the [Camera Inspector](camera-inspector.md). |
| __Depth Texture__ | Enables URP to create a `_CameraDepthTexture`. URP then uses this [depth texture](https://docs.unity3d.com/Manual/SL-DepthTextures.html) by default for all Cameras in your Scene. You can override this for individual cameras in the [Camera Inspector](camera-inspector.md). |
| __Opaque Texture__ | Enable this to create a `_CameraOpaqueTexture` as default for all cameras in your Scene. This works like the [GrabPass](https://docs.unity3d.com/Manual/SL-GrabPass.html) in the built-in render pipeline. The __Opaque Texture__ provides a snapshot of the scene right before URP renders any transparent meshes. You can use this in transparent Shaders to create effects like frosted glass, water refraction, or heat waves. You can override this for individual cameras in the [Camera Inspector](camera-inspector.md). |
These settings control the quality level of the Universal RP. This is where you can make performance better on lower-end hardware or make graphics look better on higher-end hardware.
These settings control the quality level of the URP. This is where you can make performance better on lower-end hardware or make graphics look better on higher-end hardware.
**Tip:** If you want to have different settings for different hardware, you can configure these settings across multiple Universal Render Pipeline assets, and switch them out as needed.

| Property | Description |
| --------------------- | ------------------------------------------------------------ |
| __Main Light__ | These settings affect the main [Directional Light](https://docs.unity3d.com/Manual/Lighting.html) in your Scene. You can select this by assigning it as a [Sun Source](https://docs.unity3d.com/Manual/GlobalIllumination.html) in the Lighting Inspector. If you don’t assign a sun source, the Universal RP treats the brightest directional light in the Scene as the main light. You can choose between [Pixel Lighting](https://docs.unity3d.com/Manual/LightPerformance.html) and _None_. If you choose None, Universal RP doesn’t render a main light, even if you’ve set a sun source. |
| __Main Light__ | These settings affect the main [Directional Light](https://docs.unity3d.com/Manual/Lighting.html) in your Scene. You can select this by assigning it as a [Sun Source](https://docs.unity3d.com/Manual/GlobalIllumination.html) in the Lighting Inspector. If you don’t assign a sun source, the URP treats the brightest directional light in the Scene as the main light. You can choose between [Pixel Lighting](https://docs.unity3d.com/Manual/LightPerformance.html) and _None_. If you choose None, URP doesn’t render a main light, even if you’ve set a sun source. |
| __Cast Shadows__ | Check this box to make the main light cast shadows in your Scene. |
| __Shadow Resolution__ | This controls how large the shadow map texture for the main light is. High resolutions give sharper, more detailed shadows. If memory or rendering time is an issue, try a lower resolution. |
| __Additional Lights__ | Here, you can choose to have additional lights to supplement your main light. Choose between [Per Vertex](https://docs.unity3d.com/Manual/LightPerformance.html), [Per Pixel](https://docs.unity3d.com/Manual/LightPerformance.html), or __Disabled__. |

| Property | Description |
| ---------------- | ------------------------------------------------------------ |
| __Distance__ | This controls how far ahead of the camera objects cast shadows, in Unity units. After this distance, Universal RP doesn’t render shadows. For example, the value 100 means that objects more than 100 meters away from the camera do not cast shadows. Use this in large, open worlds, where rendering shadows far away can consume lots of memory. Or use it in top-down games with limited view distance. |
| __Distance__ | This controls how far ahead of the camera objects cast shadows, in Unity units. After this distance, URP doesn’t render shadows. For example, the value 100 means that objects more than 100 meters away from the camera do not cast shadows. Use this in large, open worlds, where rendering shadows far away can consume lots of memory. Or use it in top-down games with limited view distance. |
| __Cascades__ | Select the number of [cascades](https://docs.unity3d.com/Manual/DirLightShadows.html) for shadows. A high number of cascades gives you more detailed shadows nearer the camera.The options are: __None__, __Two Cascades__ and __Four Cascades__. If you’re experiencing performance issues, try lowering the amount of cascades. You can also configure the distance for shadows in the section below the setting. Further away from the camera, shadows become less detailed. |
| __Soft Shadows__ | If you have enabled shadows for either __Main Light__ or __Additional Light__, you can enable this to add a smoother filtering on the shadow maps. This gives you smooth edges on shadows. When enabled, the render pipeline performs a 5x5 Tent filter on desktop platforms and a 4 Tap filter on mobile devices. When disabled, the render pipeline samples the shadow once with default hardware filtering. If you disable this feature, you’ll get faster rendering, but sharper, possibly pixelated, shadow edges. |

| __Dynamic Batching__ | Enable [Dynamic Batching](https://docs.unity3d.com/Manual/DrawCallBatching.html), to make the render pipeline automatically batch small dynamic objects that share the same Material. This is useful for platforms and graphics APIs that do not support GPU instancing. If your targeted hardware does support GPU instancing, disable __Dynamic Batching__. You can change this at run time. |
| __Mixed Lighting__ | Enable [Mixed Lighting](https://docs.unity3d.com/Manual/LightMode-Mixed.html), to tell the pipeline to include mixed lighting shader variants in the build. |
| __Debug Level__ | Set the level of debug information that the render pipeline generates. The values are:<br />**Disabled**: Debugging is disabled. This is the default.<br />**Profiling**: Makes the render pipeline provide detailed information tags, which you can see in the FrameDebugger. |
| __Shader Variant Log Level__ | Set the level of information about Shader Stripping and Shader Variants you want to display when Unity finishes a build. Values are:<br /> **Disabled**: Unity doesn’t log anything.<br />**Only Universal**: Unity logs information for all of the [Universal RP Shaders](shaders-in-universalrp.md).<br />**All**: Unity logs information for all Shaders in your build.<br /> You can see the information in Console panel when your build has finished. |
| __Shader Variant Log Level__ | Set the level of information about Shader Stripping and Shader Variants you want to display when Unity finishes a build. Values are:<br /> **Disabled**: Unity doesn’t log anything.<br />**Only Universal**: Unity logs information for all of the [URP Shaders](shaders-in-universalrp.md).<br />**All**: Unity logs information for all Shaders in your build.<br /> You can see the information in Console panel when your build has finished. |

4
Packages/com.unity.render-pipelines.universal/Documentation~/universalrp-builtin-feature-comparison.md


# Feature comparison table
This table provides an overview of the current features supported in the Universal Render Pipeline (Universal RP), compared to the Unity Built-in render pipeline.
This table provides an overview of the current features supported in the Universal Render Pipeline (URP), compared to the Unity Built-in render pipeline.
**Note:** If a feature is marked __In research__, the Universal RP team is still researching how and when to implement the feature. If a feature is marked as __Not supported__, it's because Unity is not planning to support it in any release.
**Note:** If a feature is marked __In research__, the URP team is still researching how and when to implement the feature. If a feature is marked as __Not supported__, it's because Unity is not planning to support it in any release.
| Feature | Unity Built-in render pipeline | Universal Render Pipeline |

14
Packages/com.unity.render-pipelines.universal/Documentation~/unlit-shader.md


# Unlit Shader
Use this Shader for effects or unique objects in your visuals that don’t need lighting. Because there are no time-consuming lighting calculations or lookups, this Shader is optimal for lower-end hardware. The Unlit Shader uses the most simple [shading model](shading-model.md) in Universal RP.
Use this Shader for effects or unique objects in your visuals that don’t need lighting. Because there are no time-consuming lighting calculations or lookups, this Shader is optimal for lower-end hardware. The Unlit Shader uses the most simple [shading model](shading-model.md) in URP.
## Using the Unlit Shader in the Editor

| Property | Description |
| ------------------ | ------------------------------------------------------------ |
| __Surface Type__ | Use this drop-down to apply an __Opaque__ or __Transparent__ surface type to the Material. This determines which render pass Universal RP renders the material in. __Opaque__ surface types are always fully visible, regardless of what’s behind them. Universal RP renders opaque Materials first. __Transparent__ surface types are affected by their background, and they can vary according to which type of transparent surface type you choose. Universal RP renders transparent Materials in a separate pass after opaque objects. If you select __Transparent__, the __Blending Mode__ drop-down appears. |
| __Blending Mode__ | Use this drop-down to determine how Universal RP calculates the color of each pixel of the transparent Material by blending the Material with the background pixels.<br/>__Alpha__ uses the Material’s alpha value to change how transparent an object is. 0 is fully transparent. 1 appears fully opaque, but the Material is still rendered during the Transparent render pass. This is useful for visuals that you want to be fully visible but to also fade over time, like clouds.<br/>__Premultiply__ applies a similar effect to the Material as __Alpha__, but preserves reflections and highlights, even when your surface is transparent. This means that only the reflected light is visible. For example, imagine transparent glass.<br/>__Additive__ adds an extra layer to the Material, on top of another surface. This is good for holograms. <br/>__Multiply__ multiplies the color of the Material with the color behind the surface. This creates a darker effect, like when you view an through tinted glass. |
| __Render Face__ | Use this drop-down to determine which sides of your geometry to render.<br/>__Front Face__ renders the front face of your geometry and [culls](https://docs.unity3d.com/Manual/SL-CullAndDepth.html) the back face. This is the default setting. <br/>__Back Face__ renders the front face of your geometry and culls the front face. <br/>__Both__ makes Universal RP render both faces of the geometry. This is good for small, flat objects, like leaves, where you might want both sides visible. |
| __Alpha Clipping__ | Makes your Material act like a [Cutout](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterRenderingMode.html) Shader. Use this to create a transparent effect with hard edges between the opaque and transparent areas. For example, to create blades of grass. To achieve this effect, Universal RP does not render alpha values below the specified __Threshold__, which appears when you enable __Alpha Clipping__. You can set the __Threshold__ by moving the slider, which accepts values from 0 to 1. All values above your threshold are fully opaque, and all values below your threshold are invisible. For example, a threshold of 0.1 means that Universal RP doesn't render alpha values below 0.1. The default value is 0.5. |
| __Surface Type__ | Use this drop-down to apply an __Opaque__ or __Transparent__ surface type to the Material. This determines which render pass URP renders the material in. __Opaque__ surface types are always fully visible, regardless of what’s behind them. URP renders opaque Materials first. __Transparent__ surface types are affected by their background, and they can vary according to which type of transparent surface type you choose. URP renders transparent Materials in a separate pass after opaque objects. If you select __Transparent__, the __Blending Mode__ drop-down appears. |
| __Blending Mode__ | Use this drop-down to determine how URP calculates the color of each pixel of the transparent Material by blending the Material with the background pixels.<br/>__Alpha__ uses the Material’s alpha value to change how transparent an object is. 0 is fully transparent. 1 appears fully opaque, but the Material is still rendered during the Transparent render pass. This is useful for visuals that you want to be fully visible but to also fade over time, like clouds.<br/>__Premultiply__ applies a similar effect to the Material as __Alpha__, but preserves reflections and highlights, even when your surface is transparent. This means that only the reflected light is visible. For example, imagine transparent glass.<br/>__Additive__ adds an extra layer to the Material, on top of another surface. This is good for holograms. <br/>__Multiply__ multiplies the color of the Material with the color behind the surface. This creates a darker effect, like when you view an through tinted glass. |
| __Render Face__ | Use this drop-down to determine which sides of your geometry to render.<br/>__Front Face__ renders the front face of your geometry and [culls](https://docs.unity3d.com/Manual/SL-CullAndDepth.html) the back face. This is the default setting. <br/>__Back Face__ renders the front face of your geometry and culls the front face. <br/>__Both__ makes URP render both faces of the geometry. This is good for small, flat objects, like leaves, where you might want both sides visible. |
| __Alpha Clipping__ | Makes your Material act like a [Cutout](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterRenderingMode.html) Shader. Use this to create a transparent effect with hard edges between the opaque and transparent areas. For example, to create blades of grass. To achieve this effect, URP does not render alpha values below the specified __Threshold__, which appears when you enable __Alpha Clipping__. You can set the __Threshold__ by moving the slider, which accepts values from 0 to 1. All values above your threshold are fully opaque, and all values below your threshold are invisible. For example, a threshold of 0.1 means that URP doesn't render alpha values below 0.1. The default value is 0.5. |
### Surface Inputs

| Property | Description |
| ------------------------- | ------------------------------------------------------------ |
| __Enable GPU Instancing__ | Makes Universal RP render meshes with the same geometry and Material in one batch, when possible. This makes rendering faster. Universal RP cannot render Meshes in one batch if they have different Materials or if the hardware does not support GPU instancing. |
| __Priority__ | Use this slider to determine the chronological rendering order for a Material. Universal RP renders Materials with higher values first. You can use this to reduce overdraw on devices by making the pipeline render Materials in front of other Materials first, so it doesn't have to render overlapping areas twice. This works similarly to the [render queue](https://docs.unity3d.com/ScriptReference/Material-renderQueue.html) in the built-in Unity render pipeline. |
| __Enable GPU Instancing__ | Makes URP render meshes with the same geometry and Material in one batch, when possible. This makes rendering faster. URP cannot render Meshes in one batch if they have different Materials or if the hardware does not support GPU instancing. |
| __Priority__ | Use this slider to determine the chronological rendering order for a Material. URP renders Materials with higher values first. You can use this to reduce overdraw on devices by making the pipeline render Materials in front of other Materials first, so it doesn't have to render overlapping areas twice. This works similarly to the [render queue](https://docs.unity3d.com/ScriptReference/Material-renderQueue.html) in the built-in Unity render pipeline. |

8
Packages/com.unity.render-pipelines.universal/Documentation~/upgrading-your-shaders.md


# Upgrading your shaders
# Upgrading your Shaders
If your Project uses shaders from the built-in render pipeline, and you want to [switch your Project to use the Universal Render Pipeline instead](installing-universalrp-into-an-existing-project), you must convert those Shaders to the Universal RP Shaders. This is because built-in Lit shaders are not compatible with Universal RP Shaders. For an overview of the mapping between built-in shaders and Universal RP Shaders, see [Shader mappings](#shader-mappings).
If your Project uses shaders from the built-in render pipeline, and you want to [switch your Project to use the Universal Render Pipeline instead](installing-universalrp-into-an-existing-project), you must convert those Shaders to the URP Shaders. This is because built-in Lit shaders are not compatible with URP Shaders. For an overview of the mapping between built-in shaders and URP Shaders, see [Shader mappings](#shader-mappings).
2. According to your needs, select either __Upgrade Project Materials to Universal RP Materials__ or __Upgrade Selected Materials to Universal RP Materials__.
2. According to your needs, select either __Upgrade Project Materials to URP Materials__ or __Upgrade Selected Materials to URP Materials__.
**Note:** These changes cannot be undone. Backup your Project before you upgrade it.

## Shader mappings
The table below shows which Universal RP shaders the Unity built-in shaders convert to when you run the shader upgrader.
The table below shows which URP shaders the Unity built-in shaders convert to when you run the shader upgrader.
| Unity built-in shader | Universal Render Pipeline shader |
| ------------------------------------------------- | ------------------------------------------- |

7
Packages/com.unity.render-pipelines.universal/Editor/2D/Light2DEditor.cs


}
}
public void AnalyticsTrackingCallback(SerializedObject serializedObject)
{
AnalyticsTrackChanges(serializedObject);
}
public override void OnInspectorGUI()
{
UniversalRenderPipelineAsset asset = UniversalRenderPipeline.asset;

EditorGUILayout.Slider(m_ShadowVolumeIntensity, 0, 1, Styles.generalShadowVolumeIntensity);
}
m_SortingLayerDropDown.OnTargetSortingLayers(serializedObject, targets, Styles.generalSortingLayerPrefixLabel);
m_SortingLayerDropDown.OnTargetSortingLayers(serializedObject, targets, Styles.generalSortingLayerPrefixLabel, AnalyticsTrackChanges);
if (m_LightType.intValue == (int)Light2D.LightType.Freeform)
{

1
Packages/com.unity.render-pipelines.universal/Editor/2D/Renderer2DMenus.cs


{
PlaceGameObjectInFrontOfSceneView(go);
StageUtility.PlaceGameObjectInCurrentStage(go); // may change parent
go.transform.position = new Vector3(go.transform.position.x, go.transform.position.y, 0);
}
// Only at this point do we know the actual parent of the object and can modify its name accordingly.

2
Packages/com.unity.render-pipelines.universal/Editor/2D/ShadowCaster2DEditor.cs


EditorGUILayout.PropertyField(m_CastsShadows, Styles.castsShadows);
EditorGUILayout.PropertyField(m_SelfShadows, Styles.selfShadows);
m_SortingLayerDropDown.OnTargetSortingLayers(serializedObject, targets, Styles.sortingLayerPrefixLabel);
m_SortingLayerDropDown.OnTargetSortingLayers(serializedObject, targets, Styles.sortingLayerPrefixLabel, null);
if (m_CastsShadows.boolValue)
ShadowCaster2DInspectorGUI<ShadowCaster2DShadowCasterShapeTool>();

14
Packages/com.unity.render-pipelines.universal/Editor/2D/SortingLayerDropDown.cs


public SerializedObject serializedObject;
public Object[] targets;
public int layerID;
public System.Action<SerializedObject> onSelectionChanged;
public LayerSelectionData(SerializedObject so, int lid, Object[] tgts)
public LayerSelectionData(SerializedObject so, int lid, Object[] tgts, System.Action<SerializedObject> selectionChangedCallback)
onSelectionChanged = selectionChangedCallback;
}
}

m_ApplyToSortingLayers.GetArrayElementAtIndex(i).intValue = m_ApplyToSortingLayersList[i];
}
//AnalyticsTrackChanges(updateSelectionData.serializedObject);
if (layerSelectionData.onSelectionChanged != null)
layerSelectionData.onSelectionChanged(layerSelectionData.serializedObject);
layerSelectionData.serializedObject.ApplyModifiedProperties();
if (layerSelectionData.targets is Light2D[])

UpdateApplyToSortingLayersArray(layerSelectionDataObject);
}
public void OnTargetSortingLayers(SerializedObject serializedObject, Object[] targets, GUIContent labelContent)
public void OnTargetSortingLayers(SerializedObject serializedObject, Object[] targets, GUIContent labelContent, System.Action<SerializedObject> selectionChangedCallback)
{
EditorGUILayout.BeginHorizontal();
EditorGUILayout.PrefixLabel(labelContent);

GenericMenu menu = new GenericMenu();
menu.allowDuplicateNames = true;
LayerSelectionData layerSelectionData = new LayerSelectionData(serializedObject, 0, targets);
LayerSelectionData layerSelectionData = new LayerSelectionData(serializedObject, 0, targets, selectionChangedCallback);
menu.AddItem(Styles.sortingLayerNone, m_ApplyToSortingLayersList.Count == 0, OnNoSortingLayerSelected, layerSelectionData);
menu.AddItem(Styles.sortingLayerAll, m_ApplyToSortingLayersList.Count == m_AllSortingLayers.Length, OnAllSortingLayersSelected, layerSelectionData);
menu.AddSeparator("");

var sortingLayer = m_AllSortingLayers[i];
layerSelectionData = new LayerSelectionData(serializedObject, sortingLayer.id, targets);
layerSelectionData = new LayerSelectionData(serializedObject, sortingLayer.id, targets, selectionChangedCallback);
menu.AddItem(m_AllSortingLayerNames[i], m_ApplyToSortingLayersList.Contains(sortingLayer.id), OnSortingLayerSelected, layerSelectionData);
}

47
Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteLitMasterNode.cs


using UnityEditor.Graphing;
using UnityEngine;
using UnityEditor.ShaderGraph;
using UnityEditor.ShaderGraph.Internal;
namespace UnityEditor.Experimental.Rendering.Universal
{

class SpriteLitMasterNode : MasterNode<ISpriteLitSubShader>, IMayRequirePosition
class SpriteLitMasterNode : MasterNode<ISpriteLitSubShader>, IMayRequirePosition, IMayRequireNormal, IMayRequireTangent
public const string PositionName = "Position";
public const string PositionName = "Vertex Position";
public const string NormalName = "Vertex Normal";
public const string TangentName = "Vertex Tangent";
public const string ColorSlotName = "Color";
public const string MaskSlotName = "Mask";
public const string NormalSlotName = "Normal";

public const int MaskSlotId = 1;
public const int NormalSlotId = 2;
public const int VertNormalSlotId = 10;
public const int VertTangentSlotId = 11;
public SpriteLitMasterNode()
{

name = "Sprite Lit Master";
AddSlot(new PositionMaterialSlot(PositionSlotId, PositionName, PositionName, CoordinateSpace.Object, ShaderStageCapability.Vertex));
AddSlot(new NormalMaterialSlot(VertNormalSlotId, NormalName, NormalName, CoordinateSpace.Object, ShaderStageCapability.Vertex));
AddSlot(new TangentMaterialSlot(VertTangentSlotId, TangentName, TangentName, CoordinateSpace.Object, ShaderStageCapability.Vertex));
AddSlot(new ColorRGBAMaterialSlot(ColorSlotId, ColorSlotName, ColorSlotName, SlotType.Input, Color.white, ShaderStageCapability.Fragment));
AddSlot(new ColorRGBAMaterialSlot(MaskSlotId, MaskSlotName, MaskSlotName, SlotType.Input, Color.white, ShaderStageCapability.Fragment));
AddSlot(new Vector3MaterialSlot(NormalSlotId, NormalSlotName, NormalSlotName, SlotType.Input, new Vector3(0.0f, 0.0f, 1.0f), ShaderStageCapability.Fragment));

{
PositionSlotId,
VertNormalSlotId,
VertTangentSlotId,
ColorSlotId,
MaskSlotId,
NormalSlotId,

public NeededCoordinateSpace RequiresPosition(ShaderStageCapability stageCapability = ShaderStageCapability.All)
public NeededCoordinateSpace RequiresNormal(ShaderStageCapability stageCapability)
{
List<MaterialSlot> slots = new List<MaterialSlot>();
GetSlots(slots);
List<MaterialSlot> validSlots = new List<MaterialSlot>();
for (int i = 0; i < slots.Count; i++)
{
if (slots[i].stageCapability != ShaderStageCapability.All && slots[i].stageCapability != stageCapability)
continue;
validSlots.Add(slots[i]);
}
return validSlots.OfType<IMayRequireNormal>().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresNormal(stageCapability));
}
public NeededCoordinateSpace RequiresPosition(ShaderStageCapability stageCapability)
{
List<MaterialSlot> slots = new List<MaterialSlot>();
GetSlots(slots);

validSlots.Add(slots[i]);
}
return validSlots.OfType<IMayRequirePosition>().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresPosition(stageCapability));
}
public NeededCoordinateSpace RequiresTangent(ShaderStageCapability stageCapability)
{
List<MaterialSlot> slots = new List<MaterialSlot>();
GetSlots(slots);
List<MaterialSlot> validSlots = new List<MaterialSlot>();
for (int i = 0; i < slots.Count; i++)
{
if (slots[i].stageCapability != ShaderStageCapability.All && slots[i].stageCapability != stageCapability)
continue;
validSlots.Add(slots[i]);
}
return validSlots.OfType<IMayRequireTangent>().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresTangent(stageCapability));
}
}
}

47
Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/MasterNodes/SpriteUnlitMasterNode.cs


using UnityEngine;
using UnityEngine.UIElements;
using UnityEditor.ShaderGraph;
using UnityEditor.ShaderGraph.Internal;
namespace UnityEditor.Experimental.Rendering.Universal
{

class SpriteUnlitMasterNode : MasterNode<ISpriteUnlitSubShader>, IMayRequirePosition
class SpriteUnlitMasterNode : MasterNode<ISpriteUnlitSubShader>, IMayRequirePosition, IMayRequireNormal, IMayRequireTangent
public const string PositionName = "Position";
public const string PositionName = "Vertex Position";
public const string NormalName = "Vertex Normal";
public const string TangentName = "Vertex Tangent";
public const int VertNormalSlotId = 10;
public const int VertTangentSlotId = 11;
public SpriteUnlitMasterNode()
{

name = "Sprite Unlit Master";
AddSlot(new PositionMaterialSlot(PositionSlotId, PositionName, PositionName, CoordinateSpace.Object, ShaderStageCapability.Vertex));
AddSlot(new NormalMaterialSlot(VertNormalSlotId, NormalName, NormalName, CoordinateSpace.Object, ShaderStageCapability.Vertex));
AddSlot(new TangentMaterialSlot(VertTangentSlotId, TangentName, TangentName, CoordinateSpace.Object, ShaderStageCapability.Vertex));
AddSlot(new ColorRGBAMaterialSlot(ColorSlotId, ColorSlotName, ColorSlotName, SlotType.Input, Color.white, ShaderStageCapability.Fragment));
RemoveSlotsNameNotMatching(

VertNormalSlotId,
VertTangentSlotId,
public NeededCoordinateSpace RequiresPosition(ShaderStageCapability stageCapability = ShaderStageCapability.All)
public NeededCoordinateSpace RequiresNormal(ShaderStageCapability stageCapability)
{
List<MaterialSlot> slots = new List<MaterialSlot>();
GetSlots(slots);
List<MaterialSlot> validSlots = new List<MaterialSlot>();
for (int i = 0; i < slots.Count; i++)
{
if (slots[i].stageCapability != ShaderStageCapability.All && slots[i].stageCapability != stageCapability)
continue;
validSlots.Add(slots[i]);
}
return validSlots.OfType<IMayRequireNormal>().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresNormal(stageCapability));
}
public NeededCoordinateSpace RequiresPosition(ShaderStageCapability stageCapability)
{
List<MaterialSlot> slots = new List<MaterialSlot>();
GetSlots(slots);

validSlots.Add(slots[i]);
}
return validSlots.OfType<IMayRequirePosition>().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresPosition(stageCapability));
}
public NeededCoordinateSpace RequiresTangent(ShaderStageCapability stageCapability)
{
List<MaterialSlot> slots = new List<MaterialSlot>();
GetSlots(slots);
List<MaterialSlot> validSlots = new List<MaterialSlot>();
for (int i = 0; i < slots.Count; i++)
{
if (slots[i].stageCapability != ShaderStageCapability.All && slots[i].stageCapability != stageCapability)
continue;
validSlots.Add(slots[i]);
}
return validSlots.OfType<IMayRequireTangent>().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresTangent(stageCapability));
}
}
}

1
Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineLightEditor.cs


void DrawSpotAngle()
{
EditorGUILayout.Slider(settings.spotAngle, 1f, 179f, s_Styles.SpotAngle);
settings.DrawInnerAndOuterSpotAngle();
}

1
Packages/com.unity.render-pipelines.universal/Runtime/2D/Passes/Utility/RendererLighting.cs


cmdBuffer.SetGlobalTexture("_LightLookup", GetLightLookupTexture());
cmdBuffer.SetGlobalTexture("_FalloffLookup", GetFalloffLookupTexture());
cmdBuffer.SetGlobalFloat("_FalloffIntensity", light.falloffIntensity);
cmdBuffer.SetGlobalFloat("_IsFullSpotlight", innerAngle == 1 ? 1.0f : 0.0f);
cmdBuffer.SetGlobalFloat("_LightZDistance", light.pointLightDistance);

43
Packages/com.unity.render-pipelines.universal/Runtime/Data/UniversalRenderPipelineAsset.cs


// Default values set when a new UniversalRenderPipeline asset is created
[SerializeField] int k_AssetVersion = 5;
[SerializeField] int k_AssetPreviousVersion = 5;
bool m_NeedsUpgrade;
// Deprecated settings for upgrading sakes
[SerializeField] RendererType m_RendererType = RendererType.ForwardRenderer;

// If no data we can't create pipeline instance
if (m_RendererDataList[0] == null)
{
// Could be upgrading for the first time
if (m_NeedsUpgrade)
{
UpgradeAsset(this);
}
else
{
Debug.LogError(
$"Default Renderer is missing, make sure there is a Renderer assigned as the default on the current Universal RP asset:{UniversalRenderPipeline.asset.name}",
this);
// If previous version and current version are miss-matched then we are waiting for the upgrader to kick in
if(k_AssetPreviousVersion != k_AssetVersion)
}
Debug.LogError(
$"Default Renderer is missing, make sure there is a Renderer assigned as the default on the current Universal RP asset:{UniversalRenderPipeline.asset.name}",
this);
return null;
}
if(m_Renderers == null || m_Renderers.Length < m_RendererDataList.Length)

public void OnAfterDeserialize()
{
k_AssetPreviousVersion = k_AssetVersion;
k_AssetPreviousVersion = k_AssetVersion;
m_NeedsUpgrade = true;
}
if (k_AssetVersion < 4)

m_AdditionalLightsPerObjectLimit = m_MaxPixelLights;
m_MainLightShadowmapResolution = m_ShadowAtlasResolution;
k_AssetPreviousVersion = k_AssetVersion;
m_NeedsUpgrade = true;
}
if (k_AssetVersion < 5)

m_RendererDataList[0] = m_RendererData;
}
k_AssetPreviousVersion = k_AssetVersion;
m_NeedsUpgrade = true;
if(m_NeedsUpgrade)
EditorApplication.delayCall = () => UpgradeAsset(this);
if (k_AssetPreviousVersion != k_AssetVersion)
{
EditorApplication.delayCall += () => UpgradeAsset(this);
}
#if UNITY_EDITOR
#if UNITY_EDITOR
if(asset.k_AssetPreviousVersion < 5)
{
if (asset.m_RendererType == RendererType.ForwardRenderer)

asset.k_AssetPreviousVersion = 5;
}
asset.m_NeedsUpgrade = false;
}
}
float ValidateShadowBias(float value)
{

7
Packages/com.unity.render-pipelines.universal/Runtime/ForwardRendererData.cs


protected override ScriptableRenderer Create()
{
#if UNITY_EDITOR
if (!Application.isPlaying)
{
ResourceReloader.ReloadAllNullIn(this, UniversalRenderPipelineAsset.packagePath);
ResourceReloader.ReloadAllNullIn(postProcessData, UniversalRenderPipelineAsset.packagePath);
}
ResourceReloader.ReloadAllNullIn(this, UniversalRenderPipelineAsset.packagePath);
ResourceReloader.ReloadAllNullIn(postProcessData, UniversalRenderPipelineAsset.packagePath);
#endif
return new ForwardRenderer(this);
}

18
Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl


half3 SpecularColor;
};
struct Attributes
{
float4 positionOS : POSITION;
float3 normalOS : NORMAL;
float2 uv0 : TEXCOORD0;
float2 uv1 : TEXCOORD1;
float2 uv2 : TEXCOORD2;
#ifdef _TANGENT_TO_WORLD
float4 tangentOS : TANGENT;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float2 uv : TEXCOORD0;
};
float4 MetaVertexPosition(float4 positionOS, float2 uv1, float2 uv2, float4 uv1ST, float4 uv2ST)
{
if (unity_MetaVertexControl.x)

22
Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl


density = ComputeFogFactor(TransformObjectToHClip(position).z);
}
// This function assumes the bitangent flip is encoded in tangentWS.w
float3x3 BuildTangentToWorld(float4 tangentWS, float3 normalWS)
{
// tangentWS must not be normalized (mikkts requirement)
// Normalize normalWS vector but keep the renormFactor to apply it to bitangent and tangent
float3 unnormalizedNormalWS = normalWS;
float renormFactor = 1.0 / length(unnormalizedNormalWS);
// bitangent on the fly option in xnormal to reduce vertex shader outputs.
// this is the mikktspace transformation (must use unnormalized attributes)
float3x3 tangentToWorld = CreateTangentToWorld(unnormalizedNormalWS, tangentWS.xyz, tangentWS.w > 0.0 ? 1.0 : -1.0);
// surface gradient based formulation requires a unit length initial normal. We can maintain compliance with mikkts
// by uniformly scaling all 3 vectors since normalization of the perturbed normal will cancel it.
tangentToWorld[0] = tangentToWorld[0] * renormFactor;
tangentToWorld[1] = tangentToWorld[1] * renormFactor;
tangentToWorld[2] = tangentToWorld[2] * renormFactor; // normalizes the interpolated vertex normal
return tangentToWorld;
}
// Always include Shader Graph version
// Always include last to avoid double macros
#include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl"

3
Packages/com.unity.render-pipelines.universal/Shaders/2D/Light2D-Point.shader


half _InnerAngleMult; // 1-0 where 1 is the value at 0 degrees and 1 is the value at 180 degrees
half _InnerRadiusMult; // 1-0 where 1 is the value at the center and 0 is the value at the outer radius
half _InverseHDREmulationScale;
half _IsFullSpotlight;
Varyings vert(Attributes input)
{

half attenuation = saturate(_InnerRadiusMult * lookupValueNoRot.r); // This is the code to take care of our inner radius
// Spotlight
half spotAttenuation = saturate((_OuterAngle - lookupValue.g) * _InnerAngleMult);
half spotAttenuation = saturate((_OuterAngle - lookupValue.g + _IsFullSpotlight) * _InnerAngleMult);
attenuation = attenuation * spotAttenuation;
half2 mappedUV;

18
Packages/com.unity.render-pipelines.universal/Shaders/LitMetaPass.hlsl


#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
struct Attributes
{
float4 positionOS : POSITION;
float3 normalOS : NORMAL;
float2 uv0 : TEXCOORD0;
float2 uv1 : TEXCOORD1;
float2 uv2 : TEXCOORD2;
#ifdef _TANGENT_TO_WORLD
float4 tangentOS : TANGENT;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float2 uv : TEXCOORD0;
};
Varyings UniversalVertexMeta(Attributes input)
{
Varyings output;

18
Packages/com.unity.render-pipelines.universal/Shaders/SimpleLitMetaPass.hlsl


#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
struct Attributes
{
float4 positionOS : POSITION;
float3 normalOS : NORMAL;
float2 uv0 : TEXCOORD0;
float2 uv1 : TEXCOORD1;
float2 uv2 : TEXCOORD2;
#ifdef _TANGENT_TO_WORLD
float4 tangentOS : TANGENT;
#endif
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float2 uv : TEXCOORD0;
};
Varyings UniversalVertexMeta(Attributes input)
{
Varyings output;

1
Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainDetailLit.shader


// -------------------------------------
// Unity defined keywords
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
#pragma multi_compile _ LIGHTMAP_ON
#pragma multi_compile_fog

9
Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitPasses.hlsl


nrm += splatControl.g * UnpackNormalScale(SAMPLE_TEXTURE2D(_Normal1, sampler_Normal0, uvSplat01.zw), _NormalScale1);
nrm += splatControl.b * UnpackNormalScale(SAMPLE_TEXTURE2D(_Normal2, sampler_Normal0, uvSplat23.xy), _NormalScale2);
nrm += splatControl.a * UnpackNormalScale(SAMPLE_TEXTURE2D(_Normal3, sampler_Normal0, uvSplat23.zw), _NormalScale3);
nrm.z += 1e-5f; // avoid risk of NaN when normalizing.
// avoid risk of NaN when normalizing.
#if HAS_HALF
nrm.z += 0.01h;
#else
nrm.z += 1e-5f;
#endif
mixedNormal = normalize(nrm.xyz);
#endif
}

5
Packages/com.unity.render-pipelines.universal/Tests/Runtime/RuntimeTests.cs


void AssetCheck()
{
Assert.IsNotNull(currentAsset, "Render Pipeline Asset is Null");
//Assert.IsNotNull(currentAsset, "Render Pipeline Asset is Null");
// Temp fix, test passes if project isnt setup for Universal RP
if(currentAsset == null)
Assert.Pass("Render Pipeline Asset is Null, test pass by default");
Assert.AreEqual(currentAsset.GetType(), typeof(UniversalRenderPipelineAsset),
"Pipeline Asset is not Universal RP");

2
Packages/com.unity.render-pipelines.universal/package.json


"description": "The Universal Render Pipeline is a prebuilt Scriptable Render Pipeline, made by Unity. The technology offers graphics that are scalable to mobile platforms, and you can also use it for higher-end consoles and PCs. You’re able to achieve quick rendering at a high quality without needing compute shader technology. The Universal Render Pipeline uses simplified, physically based Lighting and Materials. The Universal Render Pipeline uses single-pass forward rendering. Use this pipeline to get optimized real-time performance on several platforms.",
"version": "7.1.1",
"unity": "2019.3",
"unityRelease": "0a12",
"unityRelease": "0b4",
"displayName": "Universal RP",
"dependencies": {
"com.unity.render-pipelines.core": "7.1.1",

10
Packages/com.unity.shadergraph/CHANGELOG.md


The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [7.1.1] - 2019-XX-XX
## [7.1.1] - 2019-09-05
### Added
- You can now define shader keywords on the Blackboard. Use these keywords on the graph to create static branches in the generated shader.
- The tab now shows whether you are working in a Sub Graph or a Shader Graph file.

- The Shader Graph preview no longer breaks when you create new PBR Graphs.
- Fixed an issue where deleting a group and a property at the same time would cause an error.
- Fixed the epsilon that the Hue Node uses to avoid NaN on platforms that support half precision.
- Emission nodes no longer produce errors when you use them in Sub Graphs.
- Exposure nodes no longer produce errors when you use them in Sub Graphs.
- Unlit master nodes no longer define unnecessary properties in the Universal Render Pipeline.
- Errors no longer occur when you convert a selection to a Sub Graph.
- Color nodes now handle Gamma and Linear conversions correctly.
- Sub Graph Output nodes now link to the correct documentation page.
- When you use Keywords, PBR and Unlit master nodes no longer produce errors.
## [7.0.1] - 2019-07-25
### Changed

6
Packages/com.unity.shadergraph/Editor/AssetCallbacks/CreateShaderGraph.cs


{
GraphUtil.CreateNewGraph(new PBRMasterNode());
}
[MenuItem("Assets/Create/Shader/VFX Shader Graph", false, 208)]
public static void CreateVfxShaderGraph()
{
GraphUtil.CreateNewGraph(new VfxMasterNode());
}
}
}

6
Packages/com.unity.shadergraph/Editor/Data/Enumerations/Precision.cs


namespace UnityEditor.ShaderGraph
namespace UnityEditor.ShaderGraph.Internal
public enum Precision
enum Precision
{
Inherit,
Float,

public enum ConcretePrecision
{
{
Float,
Half,
}

31
Packages/com.unity.shadergraph/Editor/Data/Graphs/AbstractShaderProperty.cs


using System;
using UnityEditor.Graphing;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.ShaderGraph.Internal
abstract class AbstractShaderProperty : ShaderInput
public abstract class AbstractShaderProperty : ShaderInput
public override ConcreteSlotValueType concreteShaderValueType => propertyType.ToConcreteShaderValueType();
internal override ConcreteSlotValueType concreteShaderValueType => propertyType.ToConcreteShaderValueType();
[SerializeField]
private bool m_GPUInstanced = false;

ConcretePrecision m_ConcretePrecision = ConcretePrecision.Float;
public Precision precision
internal Precision precision
{
get => m_Precision;
set => m_Precision = value;

public void ValidateConcretePrecision(ConcretePrecision graphPrecision)
internal void ValidateConcretePrecision(ConcretePrecision graphPrecision)
public abstract bool isBatchable { get; }
internal abstract bool isBatchable { get; }
[SerializeField]
bool m_Hidden = false;

set => m_Hidden = value;
}
public string hideTagString => hidden ? "[HideInInspector]" : "";
internal string hideTagString => hidden ? "[HideInInspector]" : "";
public virtual string GetPropertyBlockString()
internal virtual string GetPropertyBlockString()
public virtual string GetPropertyDeclarationString(string delimiter = ";")
internal virtual string GetPropertyDeclarationString(string delimiter = ";")
public virtual string GetPropertyAsArgumentString()
internal virtual string GetPropertyAsArgumentString()
public abstract AbstractMaterialNode ToConcreteNode();
public abstract PreviewProperty GetPreviewMaterialProperty();
public virtual bool isGpuInstanceable => false;
internal abstract AbstractMaterialNode ToConcreteNode();
internal abstract PreviewProperty GetPreviewMaterialProperty();
internal virtual bool isGpuInstanceable => false;
abstract class AbstractShaderProperty<T> : AbstractShaderProperty
public abstract class AbstractShaderProperty<T> : AbstractShaderProperty
{
[SerializeField]
T m_Value;

2
Packages/com.unity.shadergraph/Editor/Data/Graphs/BitangentMaterialSlot.cs


using System;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine.UIElements;
namespace UnityEditor.ShaderGraph

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/BooleanMaterialSlot.cs


using System.Collections.Generic;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;

27
Packages/com.unity.shadergraph/Editor/Data/Graphs/BooleanShaderProperty.cs


using UnityEditor.ShaderGraph.Drawing.Controls;
using UnityEngine;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.ShaderGraph.Internal
class BooleanShaderProperty : AbstractShaderProperty<bool>
[FormerName("UnityEditor.ShaderGraph.BooleanShaderProperty")]
public sealed class BooleanShaderProperty : AbstractShaderProperty<bool>
public BooleanShaderProperty()
internal BooleanShaderProperty()
public override bool isBatchable => true;
public override bool isExposable => true;
public override bool isRenamable => true;
public override string GetPropertyBlockString()
internal override bool isBatchable => true;
internal override bool isExposable => true;
internal override bool isRenamable => true;
internal override string GetPropertyBlockString()
public override AbstractMaterialNode ToConcreteNode()
internal override AbstractMaterialNode ToConcreteNode()
public override PreviewProperty GetPreviewMaterialProperty()
internal override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(propertyType)
{

}
public override ShaderInput Copy()
internal override ShaderInput Copy()
{
return new BooleanShaderProperty()
{

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/ColorMaterialSlot.cs


using System.Collections.Generic;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/ColorRGBMaterialSlot.cs


using System.Collections.Generic;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;

26
Packages/com.unity.shadergraph/Editor/Data/Graphs/ColorShaderProperty.cs


using UnityEditor.Graphing;
using UnityEngine;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.ShaderGraph.Internal
class ColorShaderProperty : AbstractShaderProperty<Color>
[FormerName("UnityEditor.ShaderGraph.ColorShaderProperty")]
public sealed class ColorShaderProperty : AbstractShaderProperty<Color>
public ColorShaderProperty()
internal ColorShaderProperty()
{
displayName = "Color";
}

public override bool isBatchable => true;
public override bool isExposable => true;
public override bool isRenamable => true;
public override bool isGpuInstanceable => true;
public string hdrTagString => colorMode == ColorMode.HDR ? "[HDR]" : "";
internal override bool isBatchable => true;
internal override bool isExposable => true;
internal override bool isRenamable => true;
internal override bool isGpuInstanceable => true;
internal string hdrTagString => colorMode == ColorMode.HDR ? "[HDR]" : "";
public override string GetPropertyBlockString()
internal override string GetPropertyBlockString()
{
return $"{hideTagString}{hdrTagString}{referenceName}(\"{displayName}\", Color) = ({NodeUtils.FloatToShaderValue(value.r)}, {NodeUtils.FloatToShaderValue(value.g)}, {NodeUtils.FloatToShaderValue(value.b)}, {NodeUtils.FloatToShaderValue(value.a)})";
}

set => m_ColorMode = value;
}
public override AbstractMaterialNode ToConcreteNode()
internal override AbstractMaterialNode ToConcreteNode()
public override PreviewProperty GetPreviewMaterialProperty()
internal override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(propertyType)
{

}
public override ShaderInput Copy()
internal override ShaderInput Copy()
{
return new ColorShaderProperty()
{

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/CubemapInputMaterialSlot.cs


using System.Collections.Generic;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;

41
Packages/com.unity.shadergraph/Editor/Data/Graphs/CubemapShaderProperty.cs


using UnityEditor.Graphing;
using UnityEngine;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.ShaderGraph.Internal
class CubemapShaderProperty : AbstractShaderProperty<SerializableCubemap>
[FormerName("UnityEditor.ShaderGraph.CubemapShaderProperty")]
public sealed class CubemapShaderProperty : AbstractShaderProperty<SerializableCubemap>
public CubemapShaderProperty()
internal CubemapShaderProperty()
public override bool isBatchable => false;
public override bool isExposable => true;
public override bool isRenamable => true;
public string modifiableTagString => modifiable ? "" : "[NonModifiableTextureData]";
internal override bool isBatchable => false;
internal override bool isExposable => true;
internal override bool isRenamable => true;
internal string modifiableTagString => modifiable ? "" : "[NonModifiableTextureData]";
public override string GetPropertyBlockString()
internal override string GetPropertyBlockString()
public override string GetPropertyDeclarationString(string delimiter = ";")
internal override string GetPropertyDeclarationString(string delimiter = ";")
public override string GetPropertyAsArgumentString()
internal override string GetPropertyAsArgumentString()
public bool modifiable
internal bool modifiable
public override AbstractMaterialNode ToConcreteNode()
internal override AbstractMaterialNode ToConcreteNode()
public override PreviewProperty GetPreviewMaterialProperty()
internal override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(propertyType)
{

}
public override ShaderInput Copy()
internal override ShaderInput Copy()
{
return new CubemapShaderProperty()
{

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/DynamicMatrixMaterialSlot.cs


using System;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/DynamicValueMaterialSlot.cs


using System.Linq;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/DynamicVectorMaterialSlot.cs


using System.Linq;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;

2
Packages/com.unity.shadergraph/Editor/Data/Graphs/GradientInputMaterialSlot.cs


using System.Collections.Generic;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
namespace UnityEditor.ShaderGraph
{

28
Packages/com.unity.shadergraph/Editor/Data/Graphs/GradientShaderProperty.cs


using UnityEditor.ShaderGraph.Drawing.Controls;
using UnityEngine;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Internal;
namespace UnityEditor.ShaderGraph
{

displayName = "Gradient";
value = new Gradient();
}
public override bool isBatchable => false;
public override bool isExposable => false;
public override bool isRenamable => true;
public override string GetPropertyDeclarationString(string delimiter = ";")
internal override bool isBatchable => false;
internal override bool isExposable => false;
internal override bool isRenamable => true;
internal override string GetPropertyDeclarationString(string delimiter = ";")
{
ShaderStringBuilder s = new ShaderStringBuilder();
s.AppendLine("Gradient {0}_Definition()", referenceName);

s.AppendLine(alphas[i]);
s.AppendLine("return g;", true);
}
s.AppendLine("#define {0} {0}_Definition()", referenceName);
s.AppendIndentation();
s.Append("#define {0} {0}_Definition()", referenceName);
public override string GetPropertyAsArgumentString()
internal override string GetPropertyAsArgumentString()
public override AbstractMaterialNode ToConcreteNode()
internal override AbstractMaterialNode ToConcreteNode()
public override PreviewProperty GetPreviewMaterialProperty()
internal override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(propertyType)
{

}
public override ShaderInput Copy()
internal override ShaderInput Copy()
{
return new GradientShaderProperty
{

10
Packages/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs


using UnityEditor.Graphing;
using UnityEditor.Graphing.Util;
using UnityEditor.Rendering;
using UnityEditor.ShaderGraph.Internal;
using Edge = UnityEditor.Graphing.Edge;
namespace UnityEditor.ShaderGraph

public bool didActiveOutputNodeChange { get; set; }
internal delegate void SaveGraphDelegate(Shader shader);
internal static SaveGraphDelegate onSaveGraph;
public GraphData()
{
m_GroupItems[Guid.Empty] = new List<IGroupItem>();

// If adding a Sub Graph node whose asset contains Keywords
// Need to restest Keywords against the variant limit
if(node is SubGraphNode subGraphNode && subGraphNode.asset.keywords.Count > 0)
if(node is SubGraphNode subGraphNode &&
subGraphNode.asset != null &&
subGraphNode.asset.keywords.Count > 0)
{
OnKeywordChangedNoValidate();
}

{
if (string.IsNullOrEmpty(newName))
return;
string name = newName.Trim();
if (string.IsNullOrEmpty(name))
return;

2
Packages/com.unity.shadergraph/Editor/Data/Graphs/MaterialSlot.cs


using System.Runtime.CompilerServices;
using UnityEngine;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine.UIElements;
namespace UnityEditor.ShaderGraph

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix2MaterialSlot.cs


using System.Collections.Generic;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;

13
Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix2ShaderProperty.cs


using System;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
namespace UnityEditor.ShaderGraph

displayName = "Matrix2x2";
value = Matrix4x4.identity;
}
public override string GetPropertyAsArgumentString()
internal override string GetPropertyAsArgumentString()
public override AbstractMaterialNode ToConcreteNode()
internal override AbstractMaterialNode ToConcreteNode()
{
return new Matrix2Node
{

}
public override PreviewProperty GetPreviewMaterialProperty()
internal override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(propertyType)
{

}
public override ShaderInput Copy()
internal override ShaderInput Copy()
{
return new Matrix2ShaderProperty()
{

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix3MaterialSlot.cs


using System.Collections.Generic;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;

13
Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix3ShaderProperty.cs


using System;
using UnityEngine;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Internal;
namespace UnityEditor.ShaderGraph
{

displayName = "Matrix3x3";
value = Matrix4x4.identity;
}
public override string GetPropertyAsArgumentString()
internal override string GetPropertyAsArgumentString()
public override AbstractMaterialNode ToConcreteNode()
internal override AbstractMaterialNode ToConcreteNode()
{
return new Matrix3Node
{

};
}
public override PreviewProperty GetPreviewMaterialProperty()
internal override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(propertyType)
{

}
public override ShaderInput Copy()
internal override ShaderInput Copy()
{
return new Matrix3ShaderProperty()
{

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix4MaterialSlot.cs


using System.Collections.Generic;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;

11
Packages/com.unity.shadergraph/Editor/Data/Graphs/Matrix4ShaderProperty.cs


using System;
using UnityEngine;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Internal;
namespace UnityEditor.ShaderGraph
{

displayName = "Matrix4x4";
value = Matrix4x4.identity;
}
public override bool isGpuInstanceable => true;
internal override bool isGpuInstanceable => true;
public override AbstractMaterialNode ToConcreteNode()
internal override AbstractMaterialNode ToConcreteNode()
{
return new Matrix4Node
{

};
}
public override PreviewProperty GetPreviewMaterialProperty()
internal override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(propertyType)
{

}
public override ShaderInput Copy()
internal override ShaderInput Copy()
{
return new Matrix4ShaderProperty()
{

11
Packages/com.unity.shadergraph/Editor/Data/Graphs/MatrixShaderProperty.cs


using System;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
namespace UnityEditor.ShaderGraph

{
public override bool isBatchable => true;
public override bool isExposable => false;
public override bool isRenamable => true;
public override string GetPropertyDeclarationString(string delimiter = ";")
internal override bool isBatchable => true;
internal override bool isExposable => false;
internal override bool isRenamable => true;
internal override string GetPropertyDeclarationString(string delimiter = ";")
{
return $"{concretePrecision.ToShaderString()}4x4 {referenceName}{delimiter}";
}

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/NormalMaterialSlot.cs


using System;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine.UIElements;
namespace UnityEditor.ShaderGraph

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/PositionMaterialSlot.cs


using System;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine.UIElements;
namespace UnityEditor.ShaderGraph

1
Packages/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs


using System;
using System.Runtime.InteropServices;
using UnityEngine;
using UnityEditor.ShaderGraph.Internal;
namespace UnityEditor.ShaderGraph
{

25
Packages/com.unity.shadergraph/Editor/Data/Graphs/SamplerStateShaderProperty.cs


using System;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
namespace UnityEditor.ShaderGraph

}
public override PropertyType propertyType => PropertyType.SamplerState;
public override bool isBatchable => false;
public override bool isExposable => false;
public override bool isRenamable => false;
internal override bool isBatchable => false;
internal override bool isExposable => false;
internal override bool isRenamable => false;
public override TextureSamplerState value
{

base.value = value;
}
}
public override string GetPropertyDeclarationString(string delimiter = ";")
internal override string GetPropertyDeclarationString(string delimiter = ";")
public override string GetPropertyAsArgumentString()
internal override string GetPropertyAsArgumentString()
public override AbstractMaterialNode ToConcreteNode()
internal override AbstractMaterialNode ToConcreteNode()
return new SamplerStateNode()
return new SamplerStateNode()
{
filter = value.filter,
wrap = value.wrap

public override PreviewProperty GetPreviewMaterialProperty()
internal override PreviewProperty GetPreviewMaterialProperty()
public override ShaderInput Copy()
internal override ShaderInput Copy()
{
return new SamplerStateShaderProperty()
{

4
Packages/com.unity.shadergraph/Editor/Data/Graphs/SerializableCubemap.cs


using System;
using UnityEngine;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.ShaderGraph.Internal
class SerializableCubemap : ISerializationCallbackReceiver
public sealed class SerializableCubemap : ISerializationCallbackReceiver
{
[SerializeField]
string m_SerializedCubemap;

4
Packages/com.unity.shadergraph/Editor/Data/Graphs/SerializableTexture.cs


using System;
using UnityEngine;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.ShaderGraph.Internal
class SerializableTexture : ISerializationCallbackReceiver
public sealed class SerializableTexture : ISerializationCallbackReceiver
{
[SerializeField]
string m_SerializedTexture;

4
Packages/com.unity.shadergraph/Editor/Data/Graphs/SerializableTextureArray.cs


using System;
using UnityEngine;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.ShaderGraph.Internal
class SerializableTextureArray : ISerializationCallbackReceiver
public sealed class SerializableTextureArray : ISerializationCallbackReceiver
{
[SerializeField]
string m_SerializedTexture;

173
Packages/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.ShaderGraph.Internal
struct ShaderGraphRequirements
public struct ShaderGraphRequirements
public NeededCoordinateSpace requiresNormal;
public NeededCoordinateSpace requiresBitangent;
public NeededCoordinateSpace requiresTangent;
public NeededCoordinateSpace requiresViewDir;
public NeededCoordinateSpace requiresPosition;
public bool requiresScreenPosition;
public bool requiresVertexColor;
public bool requiresFaceSign;
public List<UVChannel> requiresMeshUVs;
public bool requiresDepthTexture;
public bool requiresCameraOpaqueTexture;
public bool requiresTime;
[SerializeField] NeededCoordinateSpace m_RequiresNormal;
[SerializeField] NeededCoordinateSpace m_RequiresBitangent;
[SerializeField] NeededCoordinateSpace m_RequiresTangent;
[SerializeField] NeededCoordinateSpace m_RequiresViewDir;
[SerializeField] NeededCoordinateSpace m_RequiresPosition;
[SerializeField] bool m_RequiresScreenPosition;
[SerializeField] bool m_RequiresVertexColor;
[SerializeField] bool m_RequiresFaceSign;
[SerializeField] List<UVChannel> m_RequiresMeshUVs;
[SerializeField] bool m_RequiresDepthTexture;
[SerializeField] bool m_RequiresCameraOpaqueTexture;
[SerializeField] bool m_RequiresTime;
public static ShaderGraphRequirements none
internal static ShaderGraphRequirements none
requiresMeshUVs = new List<UVChannel>()
m_RequiresMeshUVs = new List<UVChannel>()
public bool NeedsTangentSpace()
public NeededCoordinateSpace requiresNormal
{
get { return m_RequiresNormal; }
internal set { m_RequiresNormal = value; }
}
public NeededCoordinateSpace requiresBitangent
{
get { return m_RequiresBitangent; }
internal set { m_RequiresBitangent = value; }
}
public NeededCoordinateSpace requiresTangent
{
get { return m_RequiresTangent; }
internal set { m_RequiresTangent = value; }
}
public NeededCoordinateSpace requiresViewDir
{
get { return m_RequiresViewDir; }
internal set { m_RequiresViewDir = value; }
}
public NeededCoordinateSpace requiresPosition
{
get { return m_RequiresPosition; }
internal set { m_RequiresPosition = value; }
}
public bool requiresScreenPosition
{
get { return m_RequiresScreenPosition; }
internal set { m_RequiresScreenPosition = value; }
}
public bool requiresVertexColor
{
get { return m_RequiresVertexColor; }
internal set { m_RequiresVertexColor = value; }
}
public bool requiresFaceSign
{
get { return m_RequiresFaceSign; }
internal set { m_RequiresFaceSign = value; }
}
public List<UVChannel> requiresMeshUVs
{
get { return m_RequiresMeshUVs; }
internal set { m_RequiresMeshUVs = value; }
}
public bool requiresDepthTexture
{
get { return m_RequiresDepthTexture; }
internal set { m_RequiresDepthTexture = value; }
}
public bool requiresCameraOpaqueTexture
var compoundSpaces = requiresBitangent | requiresNormal | requiresPosition
| requiresTangent | requiresViewDir | requiresPosition
| requiresNormal;
get { return m_RequiresCameraOpaqueTexture; }
internal set { m_RequiresCameraOpaqueTexture = value; }
}
public bool requiresTime
{
get { return m_RequiresTime; }
internal set { m_RequiresTime = value; }
}
internal bool NeedsTangentSpace()
{
var compoundSpaces = m_RequiresBitangent | m_RequiresNormal | m_RequiresPosition
| m_RequiresTangent | m_RequiresViewDir | m_RequiresPosition
| m_RequiresNormal;
public ShaderGraphRequirements Union(ShaderGraphRequirements other)
internal ShaderGraphRequirements Union(ShaderGraphRequirements other)
newReqs.requiresNormal = other.requiresNormal | requiresNormal;
newReqs.requiresTangent = other.requiresTangent | requiresTangent;
newReqs.requiresBitangent = other.requiresBitangent | requiresBitangent;
newReqs.requiresViewDir = other.requiresViewDir | requiresViewDir;
newReqs.requiresPosition = other.requiresPosition | requiresPosition;
newReqs.requiresScreenPosition = other.requiresScreenPosition | requiresScreenPosition;
newReqs.requiresVertexColor = other.requiresVertexColor | requiresVertexColor;
newReqs.requiresFaceSign = other.requiresFaceSign | requiresFaceSign;
newReqs.requiresDepthTexture = other.requiresDepthTexture | requiresDepthTexture;
newReqs.requiresCameraOpaqueTexture = other.requiresCameraOpaqueTexture | requiresCameraOpaqueTexture;
newReqs.requiresTime = other.requiresTime | requiresTime;
newReqs.m_RequiresNormal = other.m_RequiresNormal | m_RequiresNormal;
newReqs.m_RequiresTangent = other.m_RequiresTangent | m_RequiresTangent;
newReqs.m_RequiresBitangent = other.m_RequiresBitangent | m_RequiresBitangent;
newReqs.m_RequiresViewDir = other.m_RequiresViewDir | m_RequiresViewDir;
newReqs.m_RequiresPosition = other.m_RequiresPosition | m_RequiresPosition;
newReqs.m_RequiresScreenPosition = other.m_RequiresScreenPosition | m_RequiresScreenPosition;
newReqs.m_RequiresVertexColor = other.m_RequiresVertexColor | m_RequiresVertexColor;
newReqs.m_RequiresFaceSign = other.m_RequiresFaceSign | m_RequiresFaceSign;
newReqs.m_RequiresDepthTexture = other.m_RequiresDepthTexture | m_RequiresDepthTexture;
newReqs.m_RequiresCameraOpaqueTexture = other.m_RequiresCameraOpaqueTexture | m_RequiresCameraOpaqueTexture;
newReqs.m_RequiresTime = other.m_RequiresTime | m_RequiresTime;
newReqs.requiresMeshUVs = new List<UVChannel>();
if (requiresMeshUVs != null)
newReqs.requiresMeshUVs.AddRange(requiresMeshUVs);
if (other.requiresMeshUVs != null)
newReqs.requiresMeshUVs.AddRange(other.requiresMeshUVs);
newReqs.m_RequiresMeshUVs = new List<UVChannel>();
if (m_RequiresMeshUVs != null)
newReqs.m_RequiresMeshUVs.AddRange(m_RequiresMeshUVs);
if (other.m_RequiresMeshUVs != null)
newReqs.m_RequiresMeshUVs.AddRange(other.m_RequiresMeshUVs);
public static ShaderGraphRequirements FromNodes<T>(List<T> nodes, ShaderStageCapability stageCapability = ShaderStageCapability.All, bool includeIntermediateSpaces = true)
internal static ShaderGraphRequirements FromNodes<T>(List<T> nodes, ShaderStageCapability stageCapability = ShaderStageCapability.All, bool includeIntermediateSpaces = true)
where T : AbstractMaterialNode
{
NeededCoordinateSpace requiresNormal = nodes.OfType<IMayRequireNormal>().Aggregate(NeededCoordinateSpace.None, (mask, node) => mask | node.RequiresNormal(stageCapability));

var reqs = new ShaderGraphRequirements()
{
requiresNormal = requiresNormal,
requiresBitangent = requiresBitangent,
requiresTangent = requiresTangent,
requiresViewDir = requiresViewDir,
requiresPosition = requiresPosition,
requiresScreenPosition = requiresScreenPosition,
requiresVertexColor = requiresVertexColor,
requiresFaceSign = requiresFaceSign,
requiresMeshUVs = meshUV,
requiresDepthTexture = requiresDepthTexture,
requiresCameraOpaqueTexture = requiresCameraOpaqueTexture,
requiresTime = requiresTime
m_RequiresNormal = requiresNormal,
m_RequiresBitangent = requiresBitangent,
m_RequiresTangent = requiresTangent,
m_RequiresViewDir = requiresViewDir,
m_RequiresPosition = requiresPosition,
m_RequiresScreenPosition = requiresScreenPosition,
m_RequiresVertexColor = requiresVertexColor,
m_RequiresFaceSign = requiresFaceSign,
m_RequiresMeshUVs = meshUV,
m_RequiresDepthTexture = requiresDepthTexture,
m_RequiresCameraOpaqueTexture = requiresCameraOpaqueTexture,
m_RequiresTime = requiresTime
};
return reqs;

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

正在加载...
取消
保存