CocosCreator波浪Shader

waveEffect.effect:

// Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
CCEffect %{
  techniques:
  - passes:
    - vert: sprite-vs:vert
      frag: sprite-fs:frag
      depthStencilState:
        depthTest: false
        depthWrite: false
      blendState:
        targets:
        - blend: true
          blendSrc: src_alpha
          blendDst: one_minus_src_alpha
          blendDstAlpha: one_minus_src_alpha
      rasterizerState:
        cullMode: none
      properties:
        alphaThreshold: { value: 0.5 }
}%

CCProgram sprite-vs %{
  precision highp float;
  #include 
  #if USE_LOCAL
    #include 
  #endif
  #if SAMPLE_FROM_RT
    #include 
  #endif
  in vec3 a_position;
  in vec2 a_texCoord;
  in vec4 a_color;

  out vec4 color;
  out vec2 uv0;

  vec4 vert () {
    vec4 pos = vec4(a_position, 1);
    
    float angleSpanH = 1.0 * 3.14159265;
    float a = mod(cc_time.x*3.0, 256.0);
    float

你可能感兴趣的:(CocosCreator,Shader,CocosCretor,shader,波浪,effect)