mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Pica/Rasterizer: Make some local lambdas static.
This commit is contained in:
		
							parent
							
								
									1561204342
								
							
						
					
					
						commit
						6e5a903286
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		|  | @ -120,14 +120,14 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0, | ||||||
|                                     bool reversed = false) |                                     bool reversed = false) | ||||||
| { | { | ||||||
|     // vertex positions in rasterizer coordinates
 |     // vertex positions in rasterizer coordinates
 | ||||||
|     auto FloatToFix = [](float24 flt) { |     static auto FloatToFix = [](float24 flt) { | ||||||
|                           // TODO: Rounding here is necessary to prevent garbage pixels at
 |         // TODO: Rounding here is necessary to prevent garbage pixels at
 | ||||||
|                           //       triangle borders. Is it that the correct solution, though?
 |         //       triangle borders. Is it that the correct solution, though?
 | ||||||
|                           return Fix12P4(static_cast<unsigned short>(round(flt.ToFloat32() * 16.0f))); |         return Fix12P4(static_cast<unsigned short>(round(flt.ToFloat32() * 16.0f))); | ||||||
|                       }; |     }; | ||||||
|     auto ScreenToRasterizerCoordinates = [FloatToFix](const Math::Vec3<float24> vec) { |     static auto ScreenToRasterizerCoordinates = [](const Math::Vec3<float24>& vec) { | ||||||
|                                              return Math::Vec3<Fix12P4>{FloatToFix(vec.x), FloatToFix(vec.y), FloatToFix(vec.z)}; |         return Math::Vec3<Fix12P4>{FloatToFix(vec.x), FloatToFix(vec.y), FloatToFix(vec.z)}; | ||||||
|                                          }; |     }; | ||||||
| 
 | 
 | ||||||
|     Math::Vec3<Fix12P4> vtxpos[3]{ ScreenToRasterizerCoordinates(v0.screenpos), |     Math::Vec3<Fix12P4> vtxpos[3]{ ScreenToRasterizerCoordinates(v0.screenpos), | ||||||
|                                    ScreenToRasterizerCoordinates(v1.screenpos), |                                    ScreenToRasterizerCoordinates(v1.screenpos), | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue