mirror of
				https://github.com/hedge-dev/XenosRecomp.git
				synced 2025-10-30 07:12:17 +00:00 
			
		
		
		
	Fix half pixel getting applied twice to reverse Z vertex shaders. (#21)
This commit is contained in:
		
							parent
							
								
									421e3b3e79
								
							
						
					
					
						commit
						990d03b28a
					
				
					 1 changed files with 9 additions and 1 deletions
				
			
		|  | @ -1827,9 +1827,14 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi | |||
|                 #endif | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                 #ifdef UNLEASHED_RECOMP | ||||
|                     if (!hasMtxProjection) | ||||
|                 #endif | ||||
|                     { | ||||
|                         out += "\toPos.xy += g_HalfPixelOffset * oPos.w;\n"; | ||||
|                     } | ||||
|                 } | ||||
| 
 | ||||
|                 if (simpleControlFlow) | ||||
|                 { | ||||
|  | @ -1874,6 +1879,9 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi | |||
| #ifdef UNLEASHED_RECOMP | ||||
|     if (hasMtxProjection) | ||||
|         out += "\t}\n"; | ||||
| 
 | ||||
|     if (!isPixelShader && hasMtxProjection) | ||||
|         out += "\toPos.xy += g_HalfPixelOffset * oPos.w;\n"; | ||||
| #endif | ||||
| 
 | ||||
|     out += "}"; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Skyth (Asilkan)
						Skyth (Asilkan)