2026-02-06 08:59:59 +00:00
|
|
|
using Godot;
|
|
|
|
|
|
2026-05-22 12:25:02 +00:00
|
|
|
using Rokojori.Extensions;
|
2026-02-06 08:59:59 +00:00
|
|
|
namespace Rokojori
|
|
|
|
|
{
|
|
|
|
|
[Tool]
|
|
|
|
|
[GlobalClass]
|
|
|
|
|
public partial class OrientatedFlareChromaticAberation:FlareChromaticAberation
|
|
|
|
|
{
|
|
|
|
|
public enum FlareOrientation
|
|
|
|
|
{
|
|
|
|
|
Inside,
|
|
|
|
|
Outside
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
|
public FlareOrientation orientation = FlareOrientation.Inside;
|
|
|
|
|
|
|
|
|
|
public override void ApplyChromaticAberation( FlareLayer.Data data )
|
|
|
|
|
{
|
|
|
|
|
ApplyChromaticAberationBase( data );
|
|
|
|
|
|
|
|
|
|
var material = data.material;
|
|
|
|
|
BaseFlareShader.chromaticAberationDirectionTowardsCenter.Set( material, orientation == FlareOrientation.Inside ? 1f : -1f );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|