| 
									
										
										
										
											2022-04-07 18:58:16 -05:00
										 |  |  | [vertex shader] | 
					
						
							|  |  |  | void main(out float tex : texcoord, inout float4 pos : sv_position) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     tex = pos.x; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-15 16:00:16 +02:00
										 |  |  | [pixel shader] | 
					
						
							| 
									
										
										
										
											2022-04-07 18:58:16 -05:00
										 |  |  | float4 main(float tex : texcoord) : sv_target | 
					
						
							| 
									
										
										
										
											2021-09-15 16:00:16 +02:00
										 |  |  | { | 
					
						
							|  |  |  |     int i; | 
					
						
							|  |  |  |     float x = 0.0; | 
					
						
							|  |  |  |     for (i = 0; i < 10; i++) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         x += i; | 
					
						
							| 
									
										
										
										
											2022-04-07 18:58:16 -05:00
										 |  |  |         if (tex > 0.5 && i == 5) | 
					
						
							| 
									
										
										
										
											2021-09-15 16:00:16 +02:00
										 |  |  |             break; | 
					
						
							| 
									
										
										
										
											2022-04-07 18:58:16 -05:00
										 |  |  |         if (tex > -0.5 && i >= 7) | 
					
						
							| 
									
										
										
										
											2021-09-15 16:00:16 +02:00
										 |  |  |             continue; | 
					
						
							|  |  |  |         x -= 1; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     return float4(i, x, 0.0, 0.0); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [test] | 
					
						
							|  |  |  | draw quad | 
					
						
							| 
									
										
										
										
											2022-04-07 18:58:16 -05:00
										 |  |  | probe rect rgba (  0, 0, 159, 480) (10.0, 35.0, 0.0, 0.0) | 
					
						
							|  |  |  | probe rect rgba (161, 0, 479, 480) (10.0, 38.0, 0.0, 0.0) | 
					
						
							|  |  |  | probe rect rgba (481, 0, 640, 480) ( 5.0, 10.0, 0.0, 0.0) |