Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Can't use multiple effects at once #7

Open
iBicha opened this issue Dec 8, 2018 · 0 comments
Open

Can't use multiple effects at once #7

iBicha opened this issue Dec 8, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@iBicha
Copy link
Owner

iBicha commented Dec 8, 2018

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:

  1. Create a class that inherits from RenderWithMaterial like 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
    {
    }
}
  1. Create an editor (inspector) for that class that inherits from RenderWithMaterialEditor like 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:

screen shot 2018-12-08 at 10 30 07 am

These are included in the repository for the sake of the example, until this is permanently fixed.

@iBicha iBicha added the bug Something isn't working label Dec 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant