Home | History | Annotate | Download | only in gradients
      1 /*
      2  * Copyright 2018 Google Inc.
      3  *
      4  * Use of this source code is governed by a BSD-style license that can be
      5  * found in the LICENSE file.
      6  */
      7 
      8 // Should have height = 1px, horizontal axis represents t = 0 to 1
      9 in uniform sampler2D gradient;
     10 
     11 @samplerParams(gradient) {
     12     GrSamplerState::ClampBilerp()
     13 }
     14 
     15 void main() {
     16     half2 coord = half2(sk_InColor.x, 0.5);
     17     sk_OutColor = texture(gradient, coord);
     18 }
     19