This repository was archived by the owner on Apr 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Can't use multiple effects at onceΒ #7
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Post processing profile prevents from adding the same effect more than once.
Even when using hacks, and successfully adding more than one effect of the same type, the renderer will only render one of them not both. This is needs to be updated in the post processing stack side.
As a work around, for each additional effect you want to use:
- Create a class that inherits from
RenderWithMateriallike so:
using System;
using ImageEffectGraph.PostProcessing;
using UnityEngine.Rendering.PostProcessing;
namespace ImageEffectGraph.Demo
{
[Serializable]
[PostProcess(typeof(RenderWithMaterialRenderer), PostProcessEvent.AfterStack, "Custom/My Other Effect")]
public class MyOtherEffect : RenderWithMaterial
{
}
}
- Create an editor (inspector) for that class that inherits from
RenderWithMaterialEditorlike so:
using ImageEffectGraph.Demo;
using ImageEffectGraph.Editor.PostProcessing;
using UnityEditor.Rendering.PostProcessing;
namespace ImageEffectGraph.Editor.Demo
{
[PostProcessEditor(typeof(MyOtherEffect))]
public class MyOtherEffectEditor : RenderWithMaterialEditor
{
}
}
And now you should be able to add the new effect from the editor:
These are included in the repository for the sake of the example, until this is permanently fixed.
interior-night
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
