HeavenStudioPlus/Assets/CRTEffects/Scripts/CRT.cs
wookywok f14d2a423f Retro VFX! (also airboarder works now) (#780)
* Super Retro VFX!

* Updated Screen Jump default

* also airboarder works now

---------

Co-authored-by: minenice55 <star.elementa@gmail.com>
2024-03-11 21:21:51 +00:00

28 lines
No EOL
1.1 KiB
C#

using System;
using UnityEngine;
// UnityEngine.Rendering.PostProcessingをusing
using UnityEngine.Rendering.PostProcessing;
[Serializable] // 必ずSerializableアトリビュートを付ける
[PostProcess(typeof(CRTRenderer), PostProcessEvent.AfterStack, "Custom/CRT", true)]
public sealed class CRT : PostProcessEffectSettings
{
[Range(0f, 1f)]
public FloatParameter distort = new FloatParameter { value = 0.0f };
[Range(0f, 1f)]
public FloatParameter RGBBlend = new FloatParameter { value = 1f };
[Range(0f, 1f)]
public FloatParameter BottomCollapse = new FloatParameter { value = 0f };
[Range(0f, 1f)]
public FloatParameter NoiseAmount = new FloatParameter { value = 0f };
/*// 有効化する条件はこうやって指定する(ちゃんとやっておいたほうがパフォーマンスにつながりそう)
public override bool IsEnabledAndSupported(PostProcessRenderContext context)
{
//Debug.Log(base.IsEnabledAndSupported(context));
return base.IsEnabledAndSupported(context) || distort != 0;
//return true;
}*/
}