| 
									
										
										
										
											2013-03-07 19:51:57 +01:00
										 |  |  | void main() | 
					
						
							| 
									
										
										
										
											2011-01-31 00:08:06 +00:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2014-07-29 12:08:57 -05:00
										 |  |  | 	float4 c0 = Sample(); | 
					
						
							| 
									
										
										
										
											2014-05-20 23:58:33 -04:00
										 |  |  | 	float4 tmp = float4(0.0, 0.0, 0.0, 0.0); | 
					
						
							| 
									
										
										
										
											2014-07-29 12:08:57 -05:00
										 |  |  | 	tmp += c0 - SampleOffset(int2( 2,  2)); | 
					
						
							|  |  |  | 	tmp += c0 - SampleOffset(int2(-2, -2)); | 
					
						
							|  |  |  | 	tmp += c0 - SampleOffset(int2( 2, -2)); | 
					
						
							|  |  |  | 	tmp += c0 - SampleOffset(int2(-2,  2)); | 
					
						
							| 
									
										
										
										
											2014-05-20 23:58:33 -04:00
										 |  |  | 	float grey = ((0.222 * tmp.r) + (0.707 * tmp.g) + (0.071 * tmp.b)); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// get rid of the bottom line, as it is incorrect. | 
					
						
							| 
									
										
										
										
											2014-07-29 12:08:57 -05:00
										 |  |  | 	if (GetCoordinates().y*GetResolution().y < 163.0) | 
					
						
							| 
									
										
										
										
											2014-05-20 23:58:33 -04:00
										 |  |  | 		tmp = float4(1.0, 1.0, 1.0, 1.0); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	c0 = c0 + 1.0 - grey * 7.0; | 
					
						
							| 
									
										
										
										
											2014-07-29 12:08:57 -05:00
										 |  |  | 	SetOutput(float4(c0.r, c0.g, c0.b, 1.0)); | 
					
						
							| 
									
										
										
										
											2014-05-05 15:59:49 -05:00
										 |  |  | } |