Changeset 1928 for trunk/tools/neercs/video/color.lolfx
- Timestamp:
- Sep 20, 2012, 12:23:59 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/neercs/video/color.lolfx
r1915 r1928 1 -- GLSL.Vert -- 1 [vert.glsl] 2 2 3 3 #version 120 4 4 5 5 void main() 6 7 gl_Position =gl_Vertex;8 gl_TexCoord[0] =gl_MultiTexCoord0;9 6 { 7 gl_Position = gl_Vertex; 8 gl_TexCoord[0] = gl_MultiTexCoord0; 9 } 10 10 11 -- GLSL.Frag -- 11 [frag.glsl] 12 12 13 13 #version 120 … … 20 20 21 21 void main(void) 22 23 vec2 p =gl_FragCoord.xy/screen_size.xy;24 vec3 c =texture2D(texture,p).xyz;22 { 23 vec2 p = gl_FragCoord.xy/screen_size.xy; 24 vec3 c = texture2D(texture,p).xyz; 25 25 26 float a =(c.x+c.y+c.z)/3.0;27 c =mix(c,vec3(a),color.w);// grayscale28 c *=filter;// filter29 c +=color.z*0.1;// level30 c *=color.x;// brightness31 c =0.5+(c-0.5)*color.y;// contrast32 c +=flash;// flash26 float a = (c.x+c.y+c.z)/3.0; 27 c = mix(c,vec3(a),color.w); // grayscale 28 c *= filter; // filter 29 c += color.z*0.1; // level 30 c *= color.x; // brightness 31 c = 0.5+(c-0.5)*color.y; // contrast 32 c += flash; // flash 33 33 34 gl_FragColor =vec4(c,1.0);35 34 gl_FragColor = vec4(c,1.0); 35 }
Note: See TracChangeset
for help on using the changeset viewer.