using Godot;

namespace Rokojori
{  
  [Tool]
  [GlobalClass]
  public partial class FadingFlareOcclusion:FlareOcclusion
  {
    [Export]
    public bool useQuickTest = true;

    [Export]
    public float zOffset = 0;

    [Export]
    public float toSize = 0.5f;


    public override void ApplyOcclusion( FlareLayer.Data data )
    {
      var material = data.material;

      BaseFlareShader.occlusionMode.Set( material, useQuickTest ? 1 : 2 );
      BaseFlareShader.occlusionZOffset.Set( material, zOffset );
      BaseFlareShader.occlusionToSize.Set( material, toSize );
    }
  }
}