Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- varying vec4 pos;
- uniform sampler2D texture;
- uniform float kat;
- void main(void){
- vec2 A=vec2(-1.0,1.0);
- vec2 B=vec2( 0.0,-1.0);
- vec2 C=vec2( 0.0, 1.0);
- vec2 D=vec2( 1.0, -1.0);
- float a1=(A.y-B.y)/(A.x-B.x);
- float b1=A.y-A.x*a1;
- float a3=(C.y-D.y)/(C.x-D.x);
- float b3=C.y-C.x*a3;
- float pi=3.14159265;
- float y=(pos.y+1.0)/2.0+radians(kat);
- vec4 grad=vec4(sin(y*pi*2.0), 0.0, 0.0, 1.0);
- vec4 alfa=vec4(0.5);
- if(pos.y>pos.x*a1+b1 && pos.y<pos.x*a3+b3)
- gl_FragColor=alfa;
- if(pos.y<pos.x*a1+b1 || pos.y>pos.x*a3+b3)
- gl_FragColor=grad;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement