Skip to content

Commit

Permalink
Added SpawnEffect commands
Browse files Browse the repository at this point in the history
  • Loading branch information
idaocracy committed Mar 13, 2024
1 parent a985ab9 commit 22b6925
Show file tree
Hide file tree
Showing 23 changed files with 609 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,3 @@ crashlytics-build.properties
# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*

# 1.19 files
Runtime/Command/
41 changes: 41 additions & 0 deletions Runtime/Command/SpawnAutoExposure.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using Naninovel.Commands;
using System.Collections.Generic;

namespace Naninovel.PostProcess
{
[CommandAlias("AutoExposure")]
public class SpawnAutoExposure : SpawnEffect
{
[ParameterAlias("time")]
public DecimalParameter FadeDuration;
public DecimalParameter Weight;
public DecimalParameter FilteringX;
public DecimalParameter FilteringY;
public DecimalParameter Minimum;
public DecimalParameter Maximum;
public DecimalParameter ExposureCompensation;
public StringParameter ProgressiveOrFixed;
public DecimalParameter ProgressiveSpeedUp;
public DecimalParameter ProgressiveSpeedDown;

protected override string Path => "AutoExposure";
protected override bool DestroyWhen => Assigned(Weight) && Weight == 0;

protected override StringListParameter GetSpawnParameters() => new List<string> {
ToSpawnParam(FadeDuration),
ToSpawnParam(Weight),
ToSpawnParam(FilteringX),
ToSpawnParam(FilteringY),
ToSpawnParam(Minimum),
ToSpawnParam(Maximum),
ToSpawnParam(ExposureCompensation),
ToSpawnParam(ProgressiveOrFixed),
ToSpawnParam(ProgressiveSpeedUp),
ToSpawnParam(ProgressiveSpeedDown)
};

protected override StringListParameter GetDestroyParameters() => new List<string> {
ToSpawnParam(FadeDuration)
};
}
}
11 changes: 11 additions & 0 deletions Runtime/Command/SpawnAutoExposure.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions Runtime/Command/SpawnBloom.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using Naninovel.Commands;
using System.Collections.Generic;

namespace Naninovel.PostProcess
{
[CommandAlias("bloom")]
public class SpawnBloom : SpawnEffect
{
[ParameterAlias("time")]
public DecimalParameter FadeDuration;
public DecimalParameter Weight;
public DecimalParameter Intensity;
public DecimalParameter Threshold;
public DecimalParameter SoftKnee;
public DecimalParameter Clamp;
public DecimalParameter Diffusion;
public DecimalParameter AnamorphicRatio;
public StringParameter Color;
public BooleanParameter FastMode;
public StringParameter DirtTexture;
public BooleanParameter DirtIntensity;

protected override string Path => $"Bloom";
protected override bool DestroyWhen => Assigned(Weight) && Weight == 0;

protected override StringListParameter GetSpawnParameters() => new List<string> {
ToSpawnParam(FadeDuration),
ToSpawnParam(Weight),
ToSpawnParam(Intensity),
ToSpawnParam(Threshold),
ToSpawnParam(SoftKnee),
ToSpawnParam(Clamp),
ToSpawnParam(Diffusion),
ToSpawnParam(AnamorphicRatio),
ToSpawnParam(Color),
ToSpawnParam(FastMode),
ToSpawnParam(DirtTexture),
ToSpawnParam(DirtIntensity)
};

protected override StringListParameter GetDestroyParameters() => new List<string> {
ToSpawnParam(FadeDuration)
};
}
}
11 changes: 11 additions & 0 deletions Runtime/Command/SpawnBloom.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions Runtime/Command/SpawnChromaticAberration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Naninovel.Commands;
using System.Collections.Generic;

namespace Naninovel.PostProcess
{
[CommandAlias("ChromaticAberration")]
public class SpawnChromaticAberration : SpawnEffect
{
[ParameterAlias("time")]
public DecimalParameter FadeDuration;
public DecimalParameter Weight;
public StringParameter SpectralLut;
public DecimalParameter Intensity;
public BooleanParameter FastMode;

protected override string Path => "ChromaticAberration";
protected override bool DestroyWhen => Assigned(Weight) && Weight == 0;

protected override StringListParameter GetSpawnParameters() => new List<string> {
ToSpawnParam(FadeDuration),
ToSpawnParam(Weight),
ToSpawnParam(SpectralLut),
ToSpawnParam(Intensity),
ToSpawnParam(FastMode)
};

protected override StringListParameter GetDestroyParameters() => new List<string> {
ToSpawnParam(FadeDuration)
};
}
}
11 changes: 11 additions & 0 deletions Runtime/Command/SpawnChromaticAberration.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions Runtime/Command/SpawnColorGradingEXT.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Naninovel.Commands;
using System.Collections.Generic;
using System.Linq;

namespace Naninovel.PostProcess
{
[CommandAlias("ColorGradingEXT")]
public class SpawnColorGradingEXT : SpawnEffect
{
[ParameterAlias("time")]
public DecimalParameter FadeDuration;
public DecimalParameter Weight;
public StringParameter LookUpTexture;

protected override string Path => "ColorGradingEXT";
protected override bool DestroyWhen => Assigned(Weight) && Weight == 0;

protected override StringListParameter GetSpawnParameters() =>
new List<string> {
ToSpawnParam(FadeDuration),
ToSpawnParam(Weight),
ToSpawnParam(LookUpTexture)
};

protected override StringListParameter GetDestroyParameters() => new List<string> {
ToSpawnParam(FadeDuration)
};
}
}
11 changes: 11 additions & 0 deletions Runtime/Command/SpawnColorGradingEXT.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 84 additions & 0 deletions Runtime/Command/SpawnColorGradingHDR.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
using Naninovel.Commands;
using System.Collections.Generic;
using System.Linq;

namespace Naninovel.PostProcess
{
[CommandAlias("ColorGradingHDR")]
public class SpawnColorGradingHDR : SpawnEffect
{
[ParameterAlias("time")]
public DecimalParameter FadeDuration;
public DecimalParameter Weight;
public StringParameter TonemapperMode;

public DecimalParameter ToeStrength;
public DecimalParameter ToeLength;
public DecimalParameter ShoulderStrength;
public DecimalParameter ShoulderLength;
public DecimalParameter ShoulderAngle;
public DecimalParameter ToneGamma;

public DecimalParameter Temperature;
public DecimalParameter Tint;
public DecimalParameter PostExposure;
public StringParameter ColorFilter;
public DecimalParameter HueShift;
public DecimalParameter Saturation;
public DecimalParameter Contrast;

public DecimalListParameter RedChannel;
public DecimalListParameter GreenChannel;
public DecimalListParameter BlueChannel;
public DecimalListParameter Lift;
public DecimalListParameter Gamma;
public DecimalListParameter Gain;

protected override string Path => "ColorGradingHDR";
protected override bool DestroyWhen => Assigned(Weight) && Weight == 0;

protected override StringListParameter GetSpawnParameters() =>
new List<string> {
ToSpawnParam(FadeDuration),
ToSpawnParam(Weight),
ToSpawnParam(TonemapperMode),
ToSpawnParam(ToeStrength),
ToSpawnParam(ToeLength),
ToSpawnParam(ShoulderStrength),
ToSpawnParam(ShoulderLength),
ToSpawnParam(ShoulderAngle),
ToSpawnParam(Temperature),
ToSpawnParam(Tint),
ToSpawnParam(PostExposure),
ToSpawnParam(ColorFilter),
ToSpawnParam(HueShift),
ToSpawnParam(Saturation),
ToSpawnParam(Contrast),
(Assigned(RedChannel) ? ToSpawnParam(RedChannel[0]) : ToSpawnParam(string.Empty)),
(Assigned(RedChannel) ? ToSpawnParam(RedChannel[1]) : ToSpawnParam(string.Empty)),
(Assigned(RedChannel) ? ToSpawnParam(RedChannel[2]) : ToSpawnParam(string.Empty)),
(Assigned(GreenChannel) ? ToSpawnParam(GreenChannel[0]) : ToSpawnParam(string.Empty)),
(Assigned(GreenChannel) ? ToSpawnParam(GreenChannel[1]) : ToSpawnParam(string.Empty)),
(Assigned(GreenChannel) ? ToSpawnParam(GreenChannel[2]) : ToSpawnParam(string.Empty)),
(Assigned(BlueChannel) ? ToSpawnParam(BlueChannel[0]) : ToSpawnParam(string.Empty)),
(Assigned(BlueChannel) ? ToSpawnParam(BlueChannel[1]) : ToSpawnParam(string.Empty)),
(Assigned(BlueChannel) ? ToSpawnParam(BlueChannel[2]) : ToSpawnParam(string.Empty)),
(Assigned(Lift) ? ToSpawnParam(Lift[0]) : ToSpawnParam(string.Empty)),
(Assigned(Lift) ? ToSpawnParam(Lift[1]) : ToSpawnParam(string.Empty)),
(Assigned(Lift) ? ToSpawnParam(Lift[2]) : ToSpawnParam(string.Empty)),
(Assigned(Lift) ? ToSpawnParam(Lift[3]) : ToSpawnParam(string.Empty)),
(Assigned(Gamma) ? ToSpawnParam(Gamma[0]) : ToSpawnParam(string.Empty)),
(Assigned(Gamma) ? ToSpawnParam(Gamma[1]) : ToSpawnParam(string.Empty)),
(Assigned(Gamma) ? ToSpawnParam(Gamma[2]) : ToSpawnParam(string.Empty)),
(Assigned(Gamma) ? ToSpawnParam(Gamma[3]) : ToSpawnParam(string.Empty)),
(Assigned(Gain) ? ToSpawnParam(Gain[0]) : ToSpawnParam(string.Empty)),
(Assigned(Gain) ? ToSpawnParam(Gain[1]) : ToSpawnParam(string.Empty)),
(Assigned(Gain) ? ToSpawnParam(Gain[2]) : ToSpawnParam(string.Empty)),
(Assigned(Gain) ? ToSpawnParam(Gain[3]) : ToSpawnParam(string.Empty)),
};

protected override StringListParameter GetDestroyParameters() => new List<string> {
ToSpawnParam(FadeDuration)
};
}
}
11 changes: 11 additions & 0 deletions Runtime/Command/SpawnColorGradingHDR.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions Runtime/Command/SpawnColorGradingLDR.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
using Naninovel.Commands;
using System.Collections.Generic;
using System.Linq;

namespace Naninovel.PostProcess
{
[CommandAlias("ColorGradingLDR")]
public class SpawnColorGradingLDR : SpawnEffect
{
[ParameterAlias("time")]
public DecimalParameter FadeDuration;
public DecimalParameter Weight;
public StringParameter LookUpTexture;
public DecimalParameter Contribution;
public DecimalParameter Temperature;
public DecimalParameter Tint;
public StringParameter ColorFilter;
public DecimalParameter HueShift;
public DecimalParameter Saturation;
public DecimalParameter Brightness;
public DecimalParameter Contrast;

public DecimalListParameter RedChannel;
public DecimalListParameter GreenChannel;
public DecimalListParameter BlueChannel;
public DecimalListParameter Lift;
public DecimalListParameter Gamma;
public DecimalListParameter Gain;

protected override string Path => "ColorGradingLDR";
protected override bool DestroyWhen => Assigned(Weight) && Weight == 0;

protected override StringListParameter GetSpawnParameters()
{
var list = new List<string> {
ToSpawnParam(FadeDuration),
ToSpawnParam(Weight),
ToSpawnParam(LookUpTexture),
ToSpawnParam(Contribution),
ToSpawnParam(Temperature),
ToSpawnParam(Tint),
ToSpawnParam(ColorFilter),
ToSpawnParam(HueShift),
ToSpawnParam(Saturation),
ToSpawnParam(Brightness),
ToSpawnParam(Contrast),
(Assigned(RedChannel) ? ToSpawnParam(RedChannel[0]) : ToSpawnParam(string.Empty)),
(Assigned(RedChannel) ? ToSpawnParam(RedChannel[1]) : ToSpawnParam(string.Empty)),
(Assigned(RedChannel) ? ToSpawnParam(RedChannel[2]) : ToSpawnParam(string.Empty)),
(Assigned(GreenChannel) ? ToSpawnParam(GreenChannel[0]) : ToSpawnParam(string.Empty)),
(Assigned(GreenChannel) ? ToSpawnParam(GreenChannel[1]) : ToSpawnParam(string.Empty)),
(Assigned(GreenChannel) ? ToSpawnParam(GreenChannel[2]) : ToSpawnParam(string.Empty)),
(Assigned(BlueChannel) ? ToSpawnParam(BlueChannel[0]) : ToSpawnParam(string.Empty)),
(Assigned(BlueChannel) ? ToSpawnParam(BlueChannel[1]) : ToSpawnParam(string.Empty)),
(Assigned(BlueChannel) ? ToSpawnParam(BlueChannel[2]) : ToSpawnParam(string.Empty)),
(Assigned(Lift) ? ToSpawnParam(Lift[0]) : ToSpawnParam(string.Empty)),
(Assigned(Lift) ? ToSpawnParam(Lift[1]) : ToSpawnParam(string.Empty)),
(Assigned(Lift) ? ToSpawnParam(Lift[2]) : ToSpawnParam(string.Empty)),
(Assigned(Lift) ? ToSpawnParam(Lift[3]) : ToSpawnParam(string.Empty)),
(Assigned(Gamma) ? ToSpawnParam(Gamma[0]) : ToSpawnParam(string.Empty)),
(Assigned(Gamma) ? ToSpawnParam(Gamma[1]) : ToSpawnParam(string.Empty)),
(Assigned(Gamma) ? ToSpawnParam(Gamma[2]) : ToSpawnParam(string.Empty)),
(Assigned(Gamma) ? ToSpawnParam(Gamma[3]) : ToSpawnParam(string.Empty)),
(Assigned(Gain) ? ToSpawnParam(Gain[0]) : ToSpawnParam(string.Empty)),
(Assigned(Gain) ? ToSpawnParam(Gain[1]) : ToSpawnParam(string.Empty)),
(Assigned(Gain) ? ToSpawnParam(Gain[2]) : ToSpawnParam(string.Empty)),
(Assigned(Gain) ? ToSpawnParam(Gain[3]) : ToSpawnParam(string.Empty)),
};

return list;
}


protected override StringListParameter GetDestroyParameters() => new List<string> {
ToSpawnParam(FadeDuration)
};
}
}
11 changes: 11 additions & 0 deletions Runtime/Command/SpawnColorGradingLDR.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 22b6925

Please sign in to comment.