SHARE
TWEET

Untitled

a guest Jun 17th, 2019 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. varying vec4 pos;
  2. uniform sampler2D texture;
  3. uniform float kat;
  4.  
  5. void main(void){
  6.    
  7.     vec2 A=vec2(-1.0,1.0);
  8.     vec2 B=vec2( 0.0,-1.0);
  9.     vec2 C=vec2( 0.0, 1.0);
  10.     vec2 D=vec2( 1.0, -1.0);
  11.    
  12.     float a1=(A.y-B.y)/(A.x-B.x);
  13.     float b1=A.y-A.x*a1;
  14.    
  15.     float a3=(C.y-D.y)/(C.x-D.x);
  16.     float b3=C.y-C.x*a3;
  17.    
  18.     float pi=3.14159265;
  19.     float y=(pos.y+1.0)/2.0+radians(kat);
  20.    
  21.     vec4 grad=vec4(sin(y*pi*2.0), 0.0, 0.0, 1.0);
  22.  
  23.     vec4 alfa=vec4(0.5);
  24.    
  25.     if(pos.y>pos.x*a1+b1  &&  pos.y<pos.x*a3+b3)
  26.     gl_FragColor=alfa;
  27.    
  28.     if(pos.y<pos.x*a1+b1  ||  pos.y>pos.x*a3+b3)
  29.         gl_FragColor=grad;
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top