Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// This file was automatically generated. Please don't edit by hand.
// This file was automatically generated. Please don't edit by hand. Execute Editor command [ Edit / Render Pipeline / Generate Shader Includes ] instead
//

#ifndef SHADERCONFIG_CS_HLSL
Expand Down
5 changes: 3 additions & 2 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- Removed the material pass probe volumes evaluation mode.
- Volume parameter of type Cubemap can now accept Cubemap render textures and custom render textures.
- Replaced last package version checker in Wizard to a link on Package Manager

## [10.3.0] - 2020-12-01

Version Updated
The version number for this package has increased due to a version update of a related graphics package.
### Changed
- Rename HDRP sub menu in Assets/Create/Shader to HD Render Pipeline for consistency.

## [10.2.1] - 2020-11-30

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ To open the **Render Pipeline Wizard**, go to **Window > Render Pipeline** and s

## Packages

At the top of the window, there is an information box that shows you the currently installed version of HDRP, as well as the latest version of HDRP that is compatible with your current Unity version.
At the top of the window, there is an information text that shows you the currently installed version of HDRP. The **Check Update** button provides a shortcut to the HDRP package in the Package Manager window.

You also have a button allow you to creates a local instance of the [High Definition Render Pipeline Config package](HDRP-Config-Package.md) in the **LocalPackage** folder of your HDRP Project. If already installed, some information about its location are displayed below.

## Default Path Settings

| **Property** | **Description** |
| ------------------------------------------ | ------------------------------------------------------------ |
| **Default Resources Folder** | Set the folder name that the Render Pipeline Wizard uses when it loads or creates resources. Click the **Populate / Reset** button to populate the **Default Resources Folder** with the resources that HDRP needs to render a Scene (for details, see [Populating the default resources folder](#populating-the-default-resources-folder)). If a default Asset already exists in the folder then clicking the Populate/Reset button resets the existing Asset. |
| **Install Configuration Editable Package** | Creates a local instance of the [High Definition Render Pipeline Config package](HDRP-Config-Package.md) in the **LocalPackage** folder of your HDRP Project. |
| **Property** | **Description** |
| ---------------------------- | ------------------------------------------------------------ |
| **Default Resources Folder** | Set the folder name that the Render Pipeline Wizard uses when it loads or creates resources. Click the **Populate / Reset** button to populate the **Default Resources Folder** with the resources that HDRP needs to render a Scene (for details, see [Populating the default resources folder](#populating-the-default-resources-folder)). If a default Asset already exists in the folder then clicking the Populate/Reset button resets the existing Asset. |

### Populating the default resources folder

Expand Down Expand Up @@ -54,6 +53,7 @@ This tab provides you with configuration options to help you make your Unity Pro
| **- Assigned** | Checks to make sure you have assigned an [HDRP Asset](HDRP-Asset.md) to the **Scriptable Render Pipeline Settings** field (menu: **Edit** > **Project Settings** > **Graphics**).<br />Press the **Fix** button to open a pop-up that allows you to either assign an HDRP Asset or create and assign a new one. |
| **- Runtime Resources** | Checks to make sure that your HDRP Asset references a [**Render Pipeline Resources**](HDRP-Asset.md) Asset.<br />Press the **Fix** button to reload the runtime resources for the HDRP Asset. |
| **- Editor Resources** | Checks to make sure that your HDRP Asset references a [**Render Pipeline Editor Resources**](HDRP-Asset.md) Asset.<br />Press the **Fix** button to reload the runtime resources for the HDRP Asset. |
| **- SRP Batcher** | Checks to make sure that SRP Batcher is enabled.<br />Press the **Fix** button to enable it in the used HDRP Asset. |
| **- Diffusion Profile** | Checks to make sure that your HDRP Asset references a [**Diffusion Profile**](Diffusion-Profile.md) Asset.<br />Press the **Fix** button to reload the runtime resources for the HDRP Asset. |
| **Default Volume Profile** | Checks to make sure you have assigned a **Default Volume Profile Asset** in **Edit** > **Project Settings** > **HDRP Default Settings** .<br />Press the **Fix** button to open a pop-up that allows you to either assign a Profile or create and assign a new one. |

Expand Down Expand Up @@ -97,5 +97,6 @@ When upgrading a project from the built-in render pipeline to HDRP, you need to

- **Upgrade Project Materials to High Definition Materials**: Upgrades every Material in your Unity Project to HDRP Materials.
- **Upgrade Selected Materials to High Definition Materials**: Upgrades every Material currently selected to HDRP Materials.
- **Upgrade HDRP Materials to Latest Version:** Upgrades every Material in your Unity Project to the latest version.

The lighting will not match as HDRP use a different attenuation function than built-in and use correct math to handle lighting model. There is no function that can convert the look. Thus the lighting will require to be redone.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace UnityEditor.Rendering.HighDefinition.ShaderGraph
{
static class CreateDecalShaderGraph
{
[MenuItem("Assets/Create/Shader/HDRP/Decal Shader Graph", false, 208)]
[MenuItem("Assets/Create/Shader/HD Render Pipeline/Decal Shader Graph", false, 208)]
public static void CreateDecalGraph()
{
var target = (HDTarget)Activator.CreateInstance(typeof(HDTarget));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace UnityEditor.Rendering.HighDefinition.ShaderGraph
{
static class CreateEyeShaderGraph
{
[MenuItem("Assets/Create/Shader/HDRP/Eye Shader Graph", false, 208)]
[MenuItem("Assets/Create/Shader/HD Render Pipeline/Eye Shader Graph", false, 208)]
public static void CreateEyeGraph()
{
var target = (HDTarget)Activator.CreateInstance(typeof(HDTarget));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace UnityEditor.Rendering.HighDefinition.ShaderGraph
{
static class CreateFabricShaderGraph
{
[MenuItem("Assets/Create/Shader/HDRP/Fabric Shader Graph", false, 208)]
[MenuItem("Assets/Create/Shader/HD Render Pipeline/Fabric Shader Graph", false, 208)]
public static void CreateFabricGraph()
{
var target = (HDTarget)Activator.CreateInstance(typeof(HDTarget));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace UnityEditor.Rendering.HighDefinition.ShaderGraph
{
static class CreateHairShaderGraph
{
[MenuItem("Assets/Create/Shader/HDRP/Hair Shader Graph", false, 208)]
[MenuItem("Assets/Create/Shader/HD Render Pipeline/Hair Shader Graph", false, 208)]
public static void CreateHairGraph()
{
var target = (HDTarget)Activator.CreateInstance(typeof(HDTarget));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace UnityEditor.Rendering.HighDefinition.ShaderGraph
{
static class CreateLitShaderGraph
{
[MenuItem("Assets/Create/Shader/HDRP/Lit Shader Graph", false, 208)]
[MenuItem("Assets/Create/Shader/HD Render Pipeline/Lit Shader Graph", false, 208)]
public static void CreateHDLitGraph()
{
var target = (HDTarget)Activator.CreateInstance(typeof(HDTarget));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace UnityEditor.Rendering.HighDefinition.ShaderGraph
{
static class CreateStackLitShaderGraph
{
[MenuItem("Assets/Create/Shader/HDRP/StackLit Shader Graph", false, 208)]
[MenuItem("Assets/Create/Shader/HD Render Pipeline/StackLit Shader Graph", false, 208)]
public static void CreateStackLitGraph()
{
var target = (HDTarget)Activator.CreateInstance(typeof(HDTarget));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace UnityEditor.Rendering.HighDefinition.ShaderGraph
{
static class CreateUnlitShaderGraph
{
[MenuItem("Assets/Create/Shader/HDRP/Unlit Shader Graph", false, 208)]
[MenuItem("Assets/Create/Shader/HD Render Pipeline/Unlit Shader Graph", false, 208)]
public static void CreateHDUnlitGraph()
{
var target = (HDTarget)Activator.CreateInstance(typeof(HDTarget));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ static void MenuCreateDiffusionProfile()
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance<DoCreateNewAssetDiffusionProfileSettings>(), "New Diffusion Profile.asset", icon, null);
}

[MenuItem("Assets/Create/Shader/HDRP/Custom FullScreen Pass")]
[MenuItem("Assets/Create/Shader/HD Render Pipeline/Custom FullScreen Pass")]
static void MenuCreateCustomFullScreenPassShader()
{
string templatePath = $"{HDUtils.GetHDRenderPipelinePath()}/Editor/RenderPipeline/CustomPass/CustomPassFullScreenShader.template";
ProjectWindowUtil.CreateScriptAssetFromTemplateFile(templatePath, "New FullScreen CustomPass.shader");
}

[MenuItem("Assets/Create/Shader/HDRP/Custom Renderers Pass")]
[MenuItem("Assets/Create/Shader/HD Render Pipeline/Custom Renderers Pass")]
static void MenuCreateCustomRenderersPassShader()
{
string templatePath = $"{HDUtils.GetHDRenderPipelinePath()}/Editor/RenderPipeline/CustomPass/CustomPassRenderersShader.template";
Expand All @@ -209,7 +209,7 @@ static void MenuCreateCSharpPostProcessVolume()
ProjectWindowUtil.CreateScriptAssetFromTemplateFile(templatePath, "New Post Process Volume.cs");
}

[MenuItem("Assets/Create/Shader/HDRP/Post Process", priority = CoreUtils.assetCreateMenuPriority3)]
[MenuItem("Assets/Create/Shader/HD Render Pipeline/Post Process", priority = CoreUtils.assetCreateMenuPriority3)]
static void MenuCreatePostProcessShader()
{
string templatePath = $"{HDUtils.GetHDRenderPipelinePath()}/Editor/PostProcessing/Templates/CustomPostProcessingShader.template";
Expand Down
17 changes: 14 additions & 3 deletions com.unity.render-pipelines.high-definition/Editor/USS/Wizard.uss
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,30 @@ ToolbarRadio
margin-right: 130px;
}

#Repopulate
.RightAnchoredButton
{
position: absolute;
right: 0px;
width: 120px;
width: 114px;
margin-top: 0px;
margin-right: 10px;
}

#LargeButton
.LargeButton
{
margin-left: 20px;
margin-right: 20px;
}

#HDRPVersionContainer
{
flex-direction: row;
margin-top: 10px;
padding-top: 3px;
padding-bottom: 3px;
padding-left: 3px;
}


/* spacing between categories */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ void FixDXRActivation(bool fromAsyncUnused)

#endregion

#region Packman
#region Package Manager

const string k_HdrpPackageName = "com.unity.render-pipelines.high-definition";
const string k_HdrpConfigPackageName = "com.unity.render-pipelines.high-definition-config";
Expand Down Expand Up @@ -821,8 +821,7 @@ void InstallLocalConfigurationPackage(Action onCompletion)

void RefreshDisplayOfConfigPackageArea()
{
if (!m_UsedPackageRetriever.isRunning)
IsLocalConfigurationPackageInstalledAsync(present => UpdateDisplayOfConfigPackageArea(present ? ConfigPackageState.Present : ConfigPackageState.Missing));
IsLocalConfigurationPackageInstalledAsync(present => UpdateDisplayOfConfigPackageArea(present ? ConfigPackageState.Present : ConfigPackageState.Missing));
}

static void CopyFolder(string sourceFolder, string destFolder)
Expand Down Expand Up @@ -915,72 +914,7 @@ void Finished()
}
}
UsedPackageRetriever m_UsedPackageRetriever = new UsedPackageRetriever();

class LastAvailablePackageVersionRetriever
{
PackageManager.Requests.SearchRequest m_CurrentRequest;
Action<string> m_CurrentAction;
string m_CurrentPackageName;

Queue<(string packageName, Action<string> action)> m_Queue = new Queue<(string packageName, Action<string> action)>();

bool isCurrentInProgress => m_CurrentRequest != null && !m_CurrentRequest.Equals(null) && !m_CurrentRequest.IsCompleted;

public bool isRunning => isCurrentInProgress || m_Queue.Count() > 0;

public void ProcessAsync(string packageName, Action<string> action)
{
if (isCurrentInProgress)
m_Queue.Enqueue((packageName, action));
else
Start(packageName, action);
}

void Start(string packageName, Action<string> action)
{
m_CurrentAction = action;
m_CurrentPackageName = packageName;
m_CurrentRequest = PackageManager.Client.Search(packageName, offlineMode: false);
EditorApplication.update += Progress;
}

void Progress()
{
//Can occures on Wizard close or if scripts reloads
if (m_CurrentRequest == null || m_CurrentRequest.Equals(null))
{
EditorApplication.update -= Progress;
return;
}

if (m_CurrentRequest.IsCompleted)
Finished();
}

void Finished()
{
EditorApplication.update -= Progress;
if (m_CurrentRequest.Status == PackageManager.StatusCode.Success)
{
string lastVersion = m_CurrentRequest.Result[0].versions.latestCompatible;
m_CurrentAction?.Invoke(lastVersion);
}
else if (m_CurrentRequest.Status >= PackageManager.StatusCode.Failure)
Debug.LogError($"Failed to find package {m_CurrentPackageName}. Reason: {m_CurrentRequest.Error.message}");
else
Debug.LogError("Unsupported progress state " + m_CurrentRequest.Status);

m_CurrentRequest = null;

if (m_Queue.Count > 0)
{
(string packageIdOrName, Action<string> action) = m_Queue.Dequeue();
EditorApplication.delayCall += () => Start(packageIdOrName, action);
}
}
}
LastAvailablePackageVersionRetriever m_LastAvailablePackageRetriever = new LastAvailablePackageVersionRetriever();


class PackageInstaller
{
PackageManager.Requests.AddRequest m_CurrentRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ static class Style
public const string migrateSelectedButton = "Upgrade Selected Materials to High Definition Materials";
public const string migrateMaterials = "Upgrade HDRP Materials to Latest Version";

public const string hdrpVersionLast = "You are using High-Definition Render Pipeline lastest {0} version."; //{0} will be replaced when displayed by the version number.
public const string hdrpVersionNotLast = "You are using High-Definition Render Pipeline {0} version. A new {1} version is available."; //{0} and {1} will be replaced when displayed by the version number.
public const string hdrpVersionWithLocalPackage = "You are using High-Definition Render Pipeline local {0} version. Last packaged version available is {1}."; //{0} and {1} will be replaced when displayed by the version number.
public const string hdrpVersionChecking = "Checking last version available for High-Definition Render Pipeline.";
public const string HDRPVersion = "Current HDRP version: ";
public const string HDRPVersionUpdateButton = "Check update";


//configuration debugger
public const string resolve = "Fix";
Expand Down Expand Up @@ -383,9 +382,9 @@ VisualElement CreateFolderData()
var repopulate = new Button(Repopulate)
{
text = Style.firstTimeInitLabel,
tooltip = Style.firstTimeInitTooltip,
name = "Repopulate"
tooltip = Style.firstTimeInitTooltip
};
repopulate.AddToClassList("RightAnchoredButton");

var row = new VisualElement() { name = "ResourceRow" };
row.Add(defaultResourceFolder);
Expand Down Expand Up @@ -431,11 +430,11 @@ VisualElement CreateWizardBehaviour()
}

VisualElement CreateLargeButton(string title, Action action)
=> new Button(action)
{
text = title,
name = "LargeButton"
};
Button button = new Button(action) { text = title };
button.AddToClassList("LargeButton");
return button;
}

VisualElement CreateInstallConfigPackageArea()
{
Expand Down Expand Up @@ -533,38 +532,24 @@ Label CreateTitle(string title)
return label;
}

HelpBox CreateHdrpVersionChecker()
VisualElement CreateHdrpVersionChecker()
{
var helpBox = new HelpBox(HelpBox.Kind.Info, Style.hdrpVersionChecking);
VisualElement container = new VisualElement() { name = "HDRPVersionContainer" };

m_LastAvailablePackageRetriever.ProcessAsync(k_HdrpPackageName, version =>
{
m_UsedPackageRetriever.ProcessAsync(k_HdrpPackageName, (installed, packageInfo) =>
{
// With recent introduction of preview srp version, our HDRP wizard don't work with Version() call
// patch it for now until this is solve.
bool compatibleWithVersionCall = version.ToString().Contains("preview") ? false : true;
TextElement label = new TextElement() { text = Style.HDRPVersion + "checking..." };
label.AddToClassList("normal");
container.Add(label);

// installed is not used because this one will be always installed
if (packageInfo.source == PackageManager.PackageSource.Local)
{
helpBox.kind = HelpBox.Kind.Info;
helpBox.text = String.Format(Style.hdrpVersionWithLocalPackage, packageInfo.version, version);
}
else if (compatibleWithVersionCall && (new Version(packageInfo.version) < new Version(version)))
{
helpBox.kind = HelpBox.Kind.Warning;
helpBox.text = String.Format(Style.hdrpVersionNotLast, packageInfo.version, version);
}
else if (compatibleWithVersionCall && (new Version(packageInfo.version) == new Version(version)))
{
helpBox.kind = HelpBox.Kind.Info;
helpBox.text = String.Format(Style.hdrpVersionLast, version);
}
});
});
Button button = new Button(() =>
UnityEditor.PackageManager.UI.Window.Open("com.unity.render-pipelines.high-definition"))
{ text = Style.HDRPVersionUpdateButton };
button.AddToClassList("RightAnchoredButton");
container.Add(button);

m_UsedPackageRetriever.ProcessAsync(k_HdrpPackageName, (installed, packageInfo)
=> label.text = Style.HDRPVersion + packageInfo.version + (packageInfo.source == PackageManager.PackageSource.Local ? " (local)" : ""));

return helpBox;
return container;
}

#endregion
Expand Down
Loading