Project

General

Profile

« Previous | Next » 

Revision 15aa7d94

Added by Leszek Koltunski almost 7 years ago

Progress with support for Effect classes.

View differences:

src/main/res/raw/main_vertex_shader.glsl
45 45

  
46 46
#if NUM_VERTEX>0
47 47
uniform int vNumEffects;             // total number of vertex effects
48
uniform int vType[NUM_VERTEX];       // their types.
48
uniform int vName[NUM_VERTEX];       // their names.
49 49
uniform vec4 vUniforms[3*NUM_VERTEX];// i-th effect is 3 consecutive vec4's: [3*i], [3*i+1], [3*i+2].
50 50
                                     // The first vec4 is the Interpolated values,
51 51
                                     // next is half cache half Center, the third -  the Region.
......
534 534
  for(int i=0; i<vNumEffects; i++)
535 535
    {
536 536
#ifdef DISTORT
537
    if( vType[i]==DISTORT) distort(j,v,n); else
537
    if( vName[i]==DISTORT) distort(j,v,n); else
538 538
#endif
539 539
#ifdef DEFORM
540
    if( vType[i]==DEFORM ) deform (j,v,n); else
540
    if( vName[i]==DEFORM ) deform (j,v,n); else
541 541
#endif
542 542
#ifdef SINK
543
    if( vType[i]==SINK   ) sink   (j,v);   else
543
    if( vName[i]==SINK   ) sink   (j,v);   else
544 544
#endif
545 545
#ifdef PINCH
546
    if( vType[i]==PINCH  ) pinch  (j,v);   else
546
    if( vName[i]==PINCH  ) pinch  (j,v);   else
547 547
#endif
548 548
#ifdef SWIRL
549
    if( vType[i]==SWIRL  ) swirl  (j,v);   else
549
    if( vName[i]==SWIRL  ) swirl  (j,v);   else
550 550
#endif
551 551
#ifdef WAVE
552
    if( vType[i]==WAVE   ) wave   (j,v,n); else
552
    if( vName[i]==WAVE   ) wave   (j,v,n); else
553 553
#endif
554 554
    {}
555 555

  

Also available in: Unified diff