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>
This commit is contained in:
wookywok
2024-03-11 16:21:51 -05:00
committed by GitHub
parent bc93a7ab94
commit 92962fef26
915 changed files with 32248 additions and 73 deletions

View File

@ -0,0 +1,57 @@
using System;
namespace XPostProcessing
{
/// <summary>
/// Use this attribute to draw a ColorWheel in the inspector.
/// </summary>
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
public sealed class ColorWheelAttribute : Attribute
{
/// <summary>
/// ColorWheel modes. These are used to compute and display pre-filtered ColorWheel vales in
/// the inspector.
/// </summary>
public enum Mode
{
/// <summary>
/// Don't display pre-filtered values.
/// </summary>
None,
/// <summary>
/// Display pre-filtered lift values.
/// </summary>
Lift,
/// <summary>
/// Display pre-filtered gamma values.
/// </summary>
Gamma,
/// <summary>
/// Display pre-filtered grain values.
/// </summary>
Gain,
Contrast
}
/// <summary>
/// The mode used to display pre-filtered values in the inspector.
/// </summary>
public readonly Mode mode;
/// <summary>
/// Creates a new attribute.
/// </summary>
/// <param name="mode">A mode used to display pre-filtered values in the inspector</param>
public ColorWheelAttribute(Mode mode)
{
this.mode = mode;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b4c8c3233482129439fd679435869372
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
//----------------------------------------------------------------------------------------------------------
// X-PostProcessing Library
// https://github.com/QianMo/X-PostProcessing-Library
// Copyright (C) 2020 QianMo. All rights reserved.
// Licensed under the MIT License
// You may not use this file except in compliance with the License.You may obtain a copy of the License at
// http://opensource.org/licenses/MIT
//----------------------------------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UnityEngine.Rendering.PostProcessing
{
[Serializable]
public sealed class GradientParameter : ParameterOverride<Gradient> { }
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 60cf005088e2612439c705ccccc052eb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,38 @@
//----------------------------------------------------------------------------------------------------------
// X-PostProcessing Library
// https://github.com/QianMo/X-PostProcessing-Library
// Copyright (C) 2020 QianMo. All rights reserved.
// Licensed under the MIT License
// You may not use this file except in compliance with the License.You may obtain a copy of the License at
// http://opensource.org/licenses/MIT
//----------------------------------------------------------------------------------------------------------
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace XPostProcessing
{
public enum Direction
{
Horizontal = 0,
Vertical = 1,
}
public enum DirectionEX
{
Horizontal = 0,
Vertical = 1,
Horizontal_Vertical =2,
}
public enum IntervalType
{
Infinite,
Periodic,
Random
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7b1b08b4caaec4247a5c9aa3be841047
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,99 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
namespace XPostProcessing
{
public class XPostProcessingUtility
{
#region Instance
private static XPostProcessingUtility _instance;
public static XPostProcessingUtility Instance
{
get
{
if (_instance == null)
{
_instance = new XPostProcessingUtility();
}
return _instance;
}
}
#endregion
//-----------------------------------------------------------------------------------------------------
static int resetFrameCount = 0;
static Color srcColor;
static Color dstColor;
public static Color GetRandomLerpColor(int RandomFrameCount, float lerpSpeed)
{
// Color version
if (resetFrameCount == 0)
{
srcColor = new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f), 1);
}
float lerp = lerpSpeed;
dstColor = Color.Lerp(dstColor, srcColor, lerp);
resetFrameCount++;
if (resetFrameCount > RandomFrameCount)
{
resetFrameCount = 0;
}
return dstColor;
}
public static Color RandomColor()
{
return new Color(Random.value, Random.value, Random.value, Random.value);
}
public int LastSelectedCategory;
public int ThumbWidth;
public int ThumbHeight;
public int cache_ThumbWidth;
public int cache_ThumbHeight;
public bool cache_IsLinear;
public RenderTexture PreviewRT;
public static void DumpRenderTexture(RenderTexture rt, string pngOutPath)
{
var oldRT = RenderTexture.active;
var tex = new Texture2D(rt.width, rt.height);
RenderTexture.active = rt;
tex.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0);
tex.Apply();
File.WriteAllBytes(pngOutPath, tex.EncodeToPNG());
RenderTexture.active = oldRT;
}
static string TypePreFix = "XPostProcessing.";
public static System.Type GetSettingByName(string typeFullName)
{
var type = System.Type.GetType(TypePreFix + typeFullName);
//Debug.Log("Utllity Type : " + type);
return type;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 46b6974378148b84c82c3dfa2d6af212
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: