mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	fixup! Shaders: Fix multiplications between 0.0 and inf
This commit is contained in:
		
							parent
							
								
									d8ef20c856
								
							
						
					
					
						commit
						eff10959de
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -1031,8 +1031,8 @@ struct float24 { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     float24 operator * (const float24& flt) const { |     float24 operator * (const float24& flt) const { | ||||||
|         if ((this->value == 0.f && flt.value == flt.value) || |         if ((this->value == 0.f && !std::isnan(flt.value)) || | ||||||
|             (flt.value == 0.f && this->value == this->value)) |             (flt.value == 0.f && !std::isnan(this->value))) | ||||||
|             // PICA gives 0 instead of NaN when multiplying by inf
 |             // PICA gives 0 instead of NaN when multiplying by inf
 | ||||||
|             return Zero(); |             return Zero(); | ||||||
|         return float24::FromFloat32(ToFloat32() * flt.ToFloat32()); |         return float24::FromFloat32(ToFloat32() * flt.ToFloat32()); | ||||||
|  | @ -1051,8 +1051,8 @@ struct float24 { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     float24& operator *= (const float24& flt) { |     float24& operator *= (const float24& flt) { | ||||||
|         if ((this->value == 0.f && flt.value == flt.value) || |         if ((this->value == 0.f && !std::isnan(flt.value)) || | ||||||
|             (flt.value == 0.f && this->value == this->value)) |             (flt.value == 0.f && !std::isnan(this->value))) | ||||||
|             // PICA gives 0 instead of NaN when multiplying by inf
 |             // PICA gives 0 instead of NaN when multiplying by inf
 | ||||||
|             *this = Zero(); |             *this = Zero(); | ||||||
|         else value *= flt.ToFloat32(); |         else value *= flt.ToFloat32(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue