import Foundation
import Metal

public class GrayscaleLinearGradientRenderable: ConfiguredQuadRenderable<GrayscaleLinearGradientRenderable.Config> {
    public struct Config: QuadRenderConfiguration {
        let rotation_ratio: ADFloat
        let start: ADFloat
        let stop: ADFloat

        public init(
            rotationRatio: ADFloat = 0.0,
            start: ADFloat = 0.0,
            stop: ADFloat = 1.0
        ) {
            self.rotation_ratio = rotationRatio
            self.start = start
            self.stop = stop
        }

        public static var defaultConfiguration: Config {
            return Config()
        }
    }

    override public var configureAction: ConfigureAction {
        return { encoder in
            super.configureAction(encoder)
        }
    }

    override var fragmentShaderName: String {
        return "grayscale_linear_gradient_frag"
    }
}
