BltShader: More hacks! Yay!
Seriously, I'm about to kill myself over this.. Not even gonna bother with math-if optimization.
This commit is contained in:
		
							parent
							
								
									99cbb4d594
								
							
						
					
					
						commit
						3a5c4eba52
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -27,7 +27,11 @@ void main()
 | 
			
		|||
	float at = ab*as;
 | 
			
		||||
	resFrag.a = at + ad - ad*at;
 | 
			
		||||
 | 
			
		||||
	resFrag.rgb = as*srcFrag.rgb + (1.0-at) * ad * dstFrag.rgb;
 | 
			
		||||
	// Sigh...
 | 
			
		||||
	if (ad == 0.0)
 | 
			
		||||
		resFrag.rgb = srcFrag.rgb;
 | 
			
		||||
	else
 | 
			
		||||
		resFrag.rgb = as*srcFrag.rgb + (1.0-at) * ad * dstFrag.rgb;
 | 
			
		||||
 | 
			
		||||
	gl_FragColor = resFrag;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue