source: trunk/tools/neercs/video/copper.lolfx @ 1905

Last change on this file since 1905 was 1905, checked in by lolbot, 7 years ago

fixed 14 files out of 2200:

  • removed 0 CR characters
  • removed 12 trailing whitespaces
  • replaced 245 tabs with spaces
File size: 774 bytes
Line 
1-- GLSL.Vert --
2
3#version 120
4
5void main()
6    {
7    gl_Position=gl_Vertex;
8    gl_TexCoord[0]=gl_MultiTexCoord0;
9    }
10
11-- GLSL.Frag --
12
13#version 120
14
15uniform sampler2D texture;
16uniform vec2 screen_size;
17uniform float time;
18uniform vec4 copper;
19
20void main(void)
21    {
22    vec2 p=gl_TexCoord[0].xy;
23    vec3 color=texture2D(texture,p).xyz;
24
25    vec3 copper=vec3(0.5);
26
27    copper.x+=0.5*cos(p.y*float(screen_size.y/64)+time*2.0);
28    copper.z+=0.5*sin(p.y*float(screen_size.y/64)+time*2.0);
29
30    copper*=0.75+0.375*cos(p.y*float(screen_size.x/8)-time*2.0);
31
32    copper.x=float(int(copper.x*8.0)*32)/256.0;
33    copper.y=float(int(copper.y*8.0)*32)/256.0;
34    copper.z=float(int(copper.z*8.0)*32)/256.0;
35
36    gl_FragColor=vec4((dot(color,color)==1.0)?copper:color,1.0);
37    }
Note: See TracBrowser for help on using the repository browser.