Radial Blur
This commit is contained in:
31915
Assets/FR2_Cache.asset
31915
Assets/FR2_Cache.asset
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -141,6 +141,7 @@ namespace Ichni.RhythmGame
|
||||
{ "CameraZoom", new CameraZoomEffect(0.2f, 5f,CustomCurvePresets.Parabolic(1,0,1))},
|
||||
{ "CameraTilt", new CameraTiltEffect(0.2f, new Vector3(0, 0, 5), CustomCurvePresets.CustomPeakTimeParabolic(1, 0, 1, 0.3f)) },
|
||||
{ "ChromaticAberration", new ChromaticAberrationEffect(1, 1, CustomCurvePresets.Parabolic(1, 0, 1)) },
|
||||
{ "RadialBlur", new RadialBlurEffect(1,4,0.5f,0.5f, 1, CustomCurvePresets.Parabolic(1,0,1))},
|
||||
{ "Vignette", new VignetteEffect(1, 1, 0.4f, Color.black, CustomCurvePresets.Parabolic(1, 0, 1)) },
|
||||
{ "SetInteger", new SetIntegerEffect("New Variable", 0, false, 0, 1) },
|
||||
{ "EnableControl", new EnableControlEffect(null, "New Variable", 0, false, "") },
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
public class RadialBlurEffect : EffectBase
|
||||
{
|
||||
private readonly NBPostProcessingController nbController;
|
||||
|
||||
public float duration;
|
||||
public int sampleLevel;
|
||||
public float position;
|
||||
public float fadeRange;
|
||||
public float peakIntensity;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
public RadialBlurEffect(float duration, int sampleLevel, float position, float fadeRange, float peakIntensity, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.sampleLevel = sampleLevel;
|
||||
this.position = position;
|
||||
this.fadeRange = fadeRange;
|
||||
this.peakIntensity = peakIntensity;
|
||||
this.intensityCurve = intensityCurve;
|
||||
this.nbController = EditorManager.instance.postProcessingManager.nbController;
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
nbController.radialBlurToggle = false;
|
||||
}
|
||||
|
||||
public override void Disrupt()
|
||||
{
|
||||
nbController.radialBlurToggle = false;
|
||||
}
|
||||
|
||||
public override void PreExecute()
|
||||
{
|
||||
nbController.radialBlurToggle = true;
|
||||
nbController.radialBlurSampleCount = sampleLevel;
|
||||
nbController.radialBlurPos = position;
|
||||
nbController.radialBlurRange = fadeRange;
|
||||
}
|
||||
|
||||
public override void Execute()
|
||||
{
|
||||
float intensity = Mathf.Lerp(0, peakIntensity, intensityCurve.Evaluate(effectProgressPercent));
|
||||
nbController.radialBlurIntensity = intensity;
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
nbController.radialBlurToggle = false;
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new RadialBlurEffect_BM(duration, sampleLevel, position, fadeRange, peakIntensity, intensityCurve);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Radial Blur Effect");
|
||||
var effectSettings = container.GenerateSubcontainer(3);
|
||||
var effectTimeField = inspector.GenerateInputField(this, effectSettings, "Effect Time", nameof(duration));
|
||||
var sampleLevelField = inspector.GenerateInputField(this, effectSettings, "Sample Level", nameof(sampleLevel));
|
||||
var positionField = inspector.GenerateInputField(this, effectSettings, "Position", nameof(position));
|
||||
var fadeRangeField = inspector.GenerateInputField(this, effectSettings, "Fade Range", nameof(fadeRange));
|
||||
var peakIntensityField = inspector.GenerateInputField(this, effectSettings, "Peak Intensity", nameof(peakIntensity));
|
||||
var intensityCurveButton = inspector.GenerateButton(this, effectSettings, "Intensity Curve", () =>
|
||||
{
|
||||
var intensityCurveWindow =
|
||||
inspector.GenerateCompositeParameterWindow(this, "Intensity Curve", nameof(intensityCurve)).SetAsCustomCurve();
|
||||
});
|
||||
SetRemove(effectSettings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class RadialBlurEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public int sampleLevel;
|
||||
public float position;
|
||||
public float fadeRange;
|
||||
public float peakIntensity;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
public RadialBlurEffect_BM(float duration, int sampleLevel, float position, float fadeRange, float peakIntensity, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.sampleLevel = sampleLevel;
|
||||
this.position = position;
|
||||
this.fadeRange = fadeRange;
|
||||
this.peakIntensity = peakIntensity;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new RadialBlurEffect(duration, sampleLevel, position, fadeRange, peakIntensity, intensityCurve)
|
||||
{
|
||||
attachedGameElement = attachedGameElement,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e69c790f6593ebd408c705cffeb3fc26
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -12,6 +12,7 @@ namespace Ichni.Editor
|
||||
public class PostProcessingManager : MonoBehaviour
|
||||
{
|
||||
public Volume globalVolume;
|
||||
public NBPostProcessingController nbController;
|
||||
public PixelateFeature pixelateFeature;
|
||||
|
||||
void Awake()
|
||||
@@ -65,7 +66,6 @@ namespace Ichni.Editor
|
||||
}
|
||||
}
|
||||
|
||||
[Button]
|
||||
public void SetFeatureActive(bool enable)
|
||||
{
|
||||
if (pixelateFeature != null)
|
||||
@@ -73,8 +73,7 @@ namespace Ichni.Editor
|
||||
pixelateFeature.SetActive(enable);
|
||||
}
|
||||
}
|
||||
|
||||
[Button]
|
||||
|
||||
public void SetPixelateStrength(float strengthX, float strengthY)
|
||||
{
|
||||
if (pixelateFeature != null)
|
||||
|
||||
@@ -1380,6 +1380,14 @@
|
||||
"enableEmission" : true,
|
||||
"emissionIntensity" : 2,
|
||||
"zWrite" : true,
|
||||
"uvScale" : {
|
||||
"x" : 1,
|
||||
"y" : 1
|
||||
},
|
||||
"uvOffset" : {
|
||||
"x" : 0,
|
||||
"y" : 0
|
||||
},
|
||||
"attachedElementGuid" : {
|
||||
"value" : "ce3d196d-15d2-48d8-91b4-454d9e89e05a"
|
||||
}
|
||||
@@ -1799,6 +1807,14 @@
|
||||
"enableEmission" : true,
|
||||
"emissionIntensity" : 1,
|
||||
"zWrite" : true,
|
||||
"uvScale" : {
|
||||
"x" : 1,
|
||||
"y" : 1
|
||||
},
|
||||
"uvOffset" : {
|
||||
"x" : 0,
|
||||
"y" : 0
|
||||
},
|
||||
"attachedElementGuid" : {
|
||||
"value" : "a63d2e1f-1d12-4713-ae33-774b7dcbb7aa"
|
||||
}
|
||||
@@ -2047,6 +2063,14 @@
|
||||
"enableEmission" : true,
|
||||
"emissionIntensity" : 1,
|
||||
"zWrite" : true,
|
||||
"uvScale" : {
|
||||
"x" : 1,
|
||||
"y" : 1
|
||||
},
|
||||
"uvOffset" : {
|
||||
"x" : 0,
|
||||
"y" : 0
|
||||
},
|
||||
"attachedElementGuid" : {
|
||||
"value" : "dffbe74a-22bb-4703-9609-43f3ea305c3b"
|
||||
}
|
||||
@@ -2295,6 +2319,14 @@
|
||||
"enableEmission" : true,
|
||||
"emissionIntensity" : 1,
|
||||
"zWrite" : true,
|
||||
"uvScale" : {
|
||||
"x" : 1,
|
||||
"y" : 1
|
||||
},
|
||||
"uvOffset" : {
|
||||
"x" : 0,
|
||||
"y" : 0
|
||||
},
|
||||
"attachedElementGuid" : {
|
||||
"value" : "eca5bdc5-d43e-476c-a0d3-a9869130142e"
|
||||
}
|
||||
@@ -2603,6 +2635,14 @@
|
||||
"enableEmission" : true,
|
||||
"emissionIntensity" : 1,
|
||||
"zWrite" : true,
|
||||
"uvScale" : {
|
||||
"x" : 1,
|
||||
"y" : 1
|
||||
},
|
||||
"uvOffset" : {
|
||||
"x" : 0,
|
||||
"y" : 0
|
||||
},
|
||||
"attachedElementGuid" : {
|
||||
"value" : "e77dced0-c2fc-4700-9623-6d6a716ce748"
|
||||
}
|
||||
@@ -10769,6 +10809,14 @@
|
||||
"enableEmission" : true,
|
||||
"emissionIntensity" : 2,
|
||||
"zWrite" : true,
|
||||
"uvScale" : {
|
||||
"x" : 1,
|
||||
"y" : 1
|
||||
},
|
||||
"uvOffset" : {
|
||||
"x" : 0,
|
||||
"y" : 0
|
||||
},
|
||||
"attachedElementGuid" : {
|
||||
"value" : "daadf812-59e2-4a8a-b055-d7304eb5860b"
|
||||
}
|
||||
@@ -61381,8 +61429,8 @@
|
||||
"y" : 0,
|
||||
"z" : 0
|
||||
},
|
||||
"materialThemeBundleName" : "departure_to_multiverse",
|
||||
"materialName" : "DTM_Particle_SquareFrame",
|
||||
"materialThemeBundleName" : "",
|
||||
"materialName" : "",
|
||||
"elementName" : "New Particle Tracker",
|
||||
"tags" : [
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user