HeavenStudioPlus/Assets/Shaders/OilPainting/BuiltInSampleScripts/ImageEffectController.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

31 lines
No EOL
1 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ImageEffectController : MonoBehaviour
{
public ScreenCaptureManager screenCaptureManager;
public Material effectMaterial;
public float impastoIntensity;
public float normalInfluence;
public float blurIntensity;
public float vignetteIntensity = 0.1357143f;
public float vignetteSmoothness = 0.3328571f;
#if UNITY_EDITOR
private void Awake()
{
Application.targetFrameRate = 60;
}
#endif
private void OnRenderImage(RenderTexture source, RenderTexture destination)
{
effectMaterial.SetFloat("_Radius", impastoIntensity);
effectMaterial.SetFloat("_NormalWeight", normalInfluence);
effectMaterial.SetFloat("_BlurSize", blurIntensity);
effectMaterial.SetFloat("_VignetteIntensity", vignetteIntensity);
effectMaterial.SetFloat("_VignetteSmoothness", vignetteSmoothness);
Graphics.Blit(source, destination, effectMaterial);
}
}