mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-12 20:55:08 +00:00
f14d2a423f
* Super Retro VFX! * Updated Screen Jump default * also airboarder works now --------- Co-authored-by: minenice55 <star.elementa@gmail.com>
31 lines
No EOL
1 KiB
C#
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);
|
|
}
|
|
} |