Changeset 1618
- Timestamp:
- Jul 10, 2012, 1:16:04 AM (10 years ago)
- Location:
- trunk/tools/neercs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/neercs/neercs.cpp
r1606 r1618 154 154 155 155 new Neercs(); 156 new DebugFps( 5, 15);156 new DebugFps(2, 2); 157 157 app.ShowPointer(false); 158 158 -
trunk/tools/neercs/video/postfx.lolfx
r1459 r1618 41 41 } 42 42 43 float round_square(in vec2 p,in vec2 b,in float r) 44 { 45 return length(max(abs(p)-b,0.0))-r; 46 } 47 48 vec3 letterbox(in vec2 p,in vec3 c) 49 { 50 vec2 b=screen_size*0.3625; 51 float r=screen_size.x*0.2; 52 float f=round_square(p,b,r); 53 return c*clamp(1.0-f,0.0,1.0); 54 } 55 43 56 void main(void) 44 57 { … … 78 91 color-=0.0125*mod(z.y*4.0+time*0.25,1.0); // electron beam 79 92 color-=(vec3(rnd1,rnd1,rnd1)-vec3(rnd2,rnd2,rnd2))*0.1; // noise 80 color*=0.75+0.25*sin(z.x*float(screen_size.x*2)); 93 color*=0.75+0.25*sin(z.x*float(screen_size.x*2)); // scanline w 81 94 color*=0.90+0.10*cos(z.y*float(screen_size.y))*sin(0.5+z.x*float(screen_size.x)); // scanline h 82 95 } … … 87 100 color=vec3(color.x*0.875,color.y*1.0,color.z*0.625); 88 101 color*=q.x*(6.0-q.x*6.0)*q.y*(6.0-q.y*6.0); // vignetting 102 color=letterbox(p,color); // letterbox 89 103 gl_FragColor=vec4(color,1.0); 90 104 }
Note: See TracChangeset
for help on using the changeset viewer.