mirror of
				https://github.com/hedge-dev/UnleashedRecomp.git
				synced 2025-10-30 07:11:05 +00:00 
			
		
		
		
	Disable primitive 2D pixel snapping & enforce linear only above 720p. (#346)
This commit is contained in:
		
							parent
							
								
									8220f6772b
								
							
						
					
					
						commit
						0b8b243404
					
				
					 2 changed files with 6 additions and 8 deletions
				
			
		|  | @ -1198,12 +1198,6 @@ PPC_FUNC(sub_830D1EF0) | |||
|             y = g_aspectRatioOffsetY + (y + 0.5f) * g_aspectRatioScale; | ||||
|         } | ||||
| 
 | ||||
|         if (Config::AspectRatio != EAspectRatio::OriginalNarrow) | ||||
|         { | ||||
|             x = round(x); | ||||
|             y = round(y); | ||||
|         } | ||||
| 
 | ||||
|         vertex[i].x = ((x - 0.5f) / Video::s_viewportWidth) * 2.0f - 1.0f; | ||||
|         vertex[i].y = ((y - 0.5f) / Video::s_viewportHeight) * -2.0f + 1.0f; | ||||
|     } | ||||
|  |  | |||
|  | @ -76,8 +76,12 @@ PPC_FUNC(sub_830D25D8) | |||
|     auto device = reinterpret_cast<GuestDevice*>(base + PPC_LOAD_U32(ctx.r4.u32)); | ||||
| 
 | ||||
|     // Set first sampler to use linear filtering.
 | ||||
|     device->samplerStates[0].data[3] = (device->samplerStates[0].data[3].get() & ~0x1f80000) | 0x1280000; | ||||
|     device->dirtyFlags[3] = device->dirtyFlags[3].get() | 0x80000000ull; | ||||
|     // NOTE: We only check for height here since all 2D primitives get centered.
 | ||||
|     if (Video::s_viewportHeight > 720) | ||||
|     { | ||||
|         device->samplerStates[0].data[3] = (device->samplerStates[0].data[3].get() & ~0x1f80000) | 0x1280000; | ||||
|         device->dirtyFlags[3] = device->dirtyFlags[3].get() | 0x80000000ull; | ||||
|     } | ||||
| 
 | ||||
|     __imp__sub_830D25D8(ctx, base); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Skyth (Asilkan)
						Skyth (Asilkan)