mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 22:00:05 +00:00 
			
		
		
		
	SwRasterizer/Lighting: dist atten lut input need to be clamp
This commit is contained in:
		
							parent
							
								
									56e5425e59
								
							
						
					
					
						commit
						4feff63ffa
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -171,7 +171,7 @@ std::tuple<Math::Vec4<u8>, Math::Vec4<u8>> ComputeFragmentsColors( | ||||||
|             size_t lut = |             size_t lut = | ||||||
|                 static_cast<size_t>(LightingRegs::LightingSampler::DistanceAttenuation) + num; |                 static_cast<size_t>(LightingRegs::LightingSampler::DistanceAttenuation) + num; | ||||||
| 
 | 
 | ||||||
|             float sample_loc = scale * distance + bias; |             float sample_loc = MathUtil::Clamp(scale * distance + bias, 0.0f, 1.0f); | ||||||
| 
 | 
 | ||||||
|             u8 lutindex = |             u8 lutindex = | ||||||
|                 static_cast<u8>(MathUtil::Clamp(std::floor(sample_loc * 256.0f), 0.0f, 255.0f)); |                 static_cast<u8>(MathUtil::Clamp(std::floor(sample_loc * 256.0f), 0.0f, 255.0f)); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue