Skip to content

Commit 76c98c1

Browse files
Antoine LelièvreEvergreen
authored andcommitted
Improve post process message when creating mismatching shader
Improve missing shader message in custom post process, improve doc, and remove 's' in post process order
1 parent 21fc624 commit 76c98c1

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

Packages/com.unity.render-pipelines.high-definition/Documentation~/custom-post-processing-create-apply.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ HDRP includes a template of each file you need to set up custom post-processing.
1414
- To create a shader file, go to **Assets** > **Create** > **Shader** and select **HDRP** **Post Process**.
1515
- To create a [Fullscreen Shader Graph](fullscreen-master-stack-reference.md), go to **Assets** > **Create** > **Shader Graph** > **HDRP** and select **Fullscreen Shader Graph**.
1616

17+
Note that the file name of both the C# post-process volume and the shader need to be the same to work without any modification. If the name doesn't match, you need to update the **kShaderName** property to reflect the actual name of the shader.
18+
1719
This creates each template file in the **Project** window in the **Assets** folder.
1820

1921
<a name="apply-custom-postprocess"></a>

Packages/com.unity.render-pipelines.high-definition/Editor/PostProcessing/CustomPostProcessVolumeComponentEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class CustomPostProcessVolumeComponentEditor : VolumeComponentEditor
1313
{
1414
internal static class Styles
1515
{
16-
public const string helpBoxLabel = "Custom Post Process Orders";
16+
public const string helpBoxLabel = "Custom Post Process Order";
1717
public const string helpBoxMessage = "This Custom Post Process is not registered in ProjectSettings > Graphics.";
1818
}
1919

Packages/com.unity.render-pipelines.high-definition/Editor/PostProcessing/Templates/CustomPostProcessingVolume.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public sealed class #SCRIPTNAME# : CustomPostProcessVolumeComponent, IPostProces
2323
if (Shader.Find(kShaderName) != null)
2424
m_Material = new Material(Shader.Find(kShaderName));
2525
else
26-
Debug.LogError($"Unable to find shader '{kShaderName}'. Post Process Volume #NAME# is unable to load.");
26+
Debug.LogError($"Unable to find shader '{kShaderName}'. Post Process Volume #NAME# is unable to load. To fix this, please edit the 'kShaderName' constant in #NAME#.cs or change the name of your custom post process shader.");
2727
}
2828

2929
public override void Render(CommandBuffer cmd, HDCamera camera, RTHandle source, RTHandle destination)

Packages/com.unity.render-pipelines.high-definition/Runtime/Settings/CustomPostProcessOrdersSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace UnityEngine.Rendering.HighDefinition
44
{
55
[Serializable]
66
[SupportedOnRenderPipeline(typeof(HDRenderPipelineAsset))]
7-
[Categorization.CategoryInfo(Name = "Custom Post Process Orders", Order = 30)]
7+
[Categorization.CategoryInfo(Name = "Custom Post Process Order", Order = 30)]
88
class CustomPostProcessOrdersSettings : IRenderPipelineGraphicsSettings
99
{
1010
#region Version

Packages/com.unity.render-pipelines.high-definition/Samples~/FullscreenSamples/Scripts/Colorblindness.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public colorblindness_Types_Parameter(colorblindness_Types value, bool overrideS
2121

2222
public bool IsActive() => m_Material != null && intensity.value > 0f;
2323

24-
// Do not forget to add this post process in the Custom Post Process Orders list (Project Settings > Graphics > HDRP Settings).
24+
// Do not forget to add this post process in the Custom Post Process Order list (Project Settings > Graphics > HDRP Settings).
2525
public override CustomPostProcessInjectionPoint injectionPoint => CustomPostProcessInjectionPoint.AfterPostProcess;
2626

2727
const string kShaderName = "HDRPSamples/ColorblindFilter";

Packages/com.unity.render-pipelines.high-definition/Samples~/FullscreenSamples/Scripts/FullscreenSamplesEffectSelection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void SwitchEffect()
9393
infos = "The rain animation is created through a shadergraph rendering on a Double Buffered Custom Render Target.\n This creates an animated texture of water droplets.\nThe animated texture is then used in another Shadergraph on a Fullscreen Custom Pass.\nCodeless.\n\n To note : while in editor and outside of runtime, the double buffered Render Target update timing is not consistant.";
9494
break;
9595
case FullscreenEffectsEnum.ColorblindnessFilter:
96-
infos = "Filter that simulates types of Colorblindness.\nThis filter needs to be applied to the final color of the render, after Tonemapping or any other color grading.\nThis is done in Shadergraph by using PostProcessInput of the HDSampleBuffer node, which is only available after Post Process. \nIt means a new Post Process for the Volume Profile needs to be created.\nCustom Post Process are created through C# script, see Colorblindness.cs \n\nThis custom post process needs to be added to the HDRP Global settings \n(Custom Post Process Orders > After Post Process)\n otherwise HDRP won't recognize it.\nThen, Colorblindness will be available as a new Override for Volume Profile under Post-Processing>Custom.";
96+
infos = "Filter that simulates types of Colorblindness.\nThis filter needs to be applied to the final color of the render, after Tonemapping or any other color grading.\nThis is done in Shadergraph by using PostProcessInput of the HDSampleBuffer node, which is only available after Post Process. \nIt means a new Post Process for the Volume Profile needs to be created.\nCustom Post Process are created through C# script, see Colorblindness.cs \n\nThis custom post process needs to be added to the HDRP Global settings \n(Custom Post Process Order > After Post Process)\n otherwise HDRP won't recognize it.\nThen, Colorblindness will be available as a new Override for Volume Profile under Post-Processing>Custom.";
9797
break;
9898
//............................................Add infos of the next effect here
9999
//The prefabs to instantiate needs to be added to the array list on the component at the same index

0 commit comments

Comments
 (0)