Sorry, I was a bit confused that I thought I wrote something wrong. I'm using this.
http://staggart.xyz/unity/sc-post-effects/scpe-docs/?section=sc-post-effectsFor my own shaders I use Amplify Shaders which auto generates a script for me. It can look like this.
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
#if UNITY_POST_PROCESSING_STACK_V2
using System;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
[Serializable]
[PostProcess( typeof( ColourAdjustPPSRenderer ), PostProcessEvent.AfterStack, "Colour Adjust", true )]
public sealed class ColourAdjustPP : PostProcessEffectSettings
{
[Tooltip("Brightness")]
[Range(-1f, 1)]
public FloatParameter Brightness = new FloatParameter { value = 0f };
[Tooltip("Contrast")]
[Range(-1f, 1)]
public FloatParameter Contrast = new FloatParameter { value = 0f };
[Tooltip("Saturation")]
[Range(-1f, 1)]
public FloatParameter Saturation = new FloatParameter { value = 0f };
[Space(5)]
[Header("Tint")]
[Tooltip("H")]
[Range(0f, 1)]
public FloatParameter H = new FloatParameter { value = 0.5f };
[Tooltip("S")]
[Range(0f, 1)]
public FloatParameter S = new FloatParameter { value = 1f };
[Tooltip("V")]
[Range(0f, 1)]
public FloatParameter V = new FloatParameter { value = 0f };
}
public sealed class ColourAdjustPPSRenderer : PostProcessEffectRenderer<ColourAdjustPP>
{
public override void Render( PostProcessRenderContext context )
{
var sheet = context.propertySheets.Get( Shader.Find( "Colour Adjust" ) );
sheet.properties.SetFloat( "Brightness", settings.Brightness );
sheet.properties.SetFloat( "Contrast", settings.Contrast );
sheet.properties.SetFloat( "Saturation", settings.Saturation );
sheet.properties.SetFloat( "H", settings.H );
sheet.properties.SetFloat( "S", settings.S );
sheet.properties.SetFloat( "V", settings.V );
context.command.BlitFullscreenTriangle( context.source, context.destination, sheet, 0 );
}
}
#endif
Now, I don't expect a custom action for everything, that would be insane and it wouldn't work for my own stuff.
Using Get/Set properties does not work but maybe a custom action that can get/set the shaders variables in the profile?
Maybe something like the Conditional Expression action, there you have to write the variables and logic yourself would work?