mirror of
				https://github.com/hedge-dev/XenosRecomp.git
				synced 2025-10-30 07:12:17 +00:00 
			
		
		
		
	Compare commits
	
		
			13 commits
		
	
	
		
			cf49b058f4
			...
			ebfbf9de89
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | ebfbf9de89 | ||
|   | 13fb9fd4b9 | ||
|   | c96ad61b71 | ||
|   | 46938a4142 | ||
|   | 253c5954cd | ||
|   | ce5aeb3fef | ||
|   | d6cd7ca917 | ||
|   | f542f86c28 | ||
|   | 88196ee508 | ||
|   | 85c3c83fa7 | ||
|   | 04539fdf02 | ||
|   | e851c0baff | ||
|   | 421e3b3e79 | 
					 2 changed files with 12 additions and 5 deletions
				
			
		|  | @ -29,7 +29,8 @@ struct PushConstants | |||
| 
 | ||||
| #define g_Booleans                 vk::RawBufferLoad<uint>(g_PushConstants.SharedConstants + 256) | ||||
| #define g_SwappedTexcoords         vk::RawBufferLoad<uint>(g_PushConstants.SharedConstants + 260) | ||||
| #define g_AlphaThreshold           vk::RawBufferLoad<float>(g_PushConstants.SharedConstants + 264) | ||||
| #define g_HalfPixelOffset          vk::RawBufferLoad<float2>(g_PushConstants.SharedConstants + 264) | ||||
| #define g_AlphaThreshold           vk::RawBufferLoad<float>(g_PushConstants.SharedConstants + 272) | ||||
| 
 | ||||
| [[vk::constant_id(0)]] const uint g_SpecConstants = 0; | ||||
| 
 | ||||
|  | @ -58,14 +59,16 @@ struct PushConstants | |||
| 
 | ||||
| #define g_Booleans (*(reinterpret_cast<device uint*>(g_PushConstants.SharedConstants + 256))) | ||||
| #define g_SwappedTexcoords (*(reinterpret_cast<device uint*>(g_PushConstants.SharedConstants + 260))) | ||||
| #define g_AlphaThreshold (*(reinterpret_cast<device float*>(g_PushConstants.SharedConstants + 264))) | ||||
| #define g_HalfPixelOffset (*(reinterpret_cast<device float*>(g_PushConstants.SharedConstants + 264))) | ||||
| #define g_AlphaThreshold (*(reinterpret_cast<device float*>(g_PushConstants.SharedConstants + 272))) | ||||
| 
 | ||||
| #else | ||||
| 
 | ||||
| #define DEFINE_SHARED_CONSTANTS() \ | ||||
|     uint g_Booleans : packoffset(c16.x); \ | ||||
|     uint g_SwappedTexcoords : packoffset(c16.y); \ | ||||
|     float g_AlphaThreshold : packoffset(c16.z) \ | ||||
|     float2 g_HalfPixelOffset : packoffset(c16.z); \ | ||||
|     float g_AlphaThreshold : packoffset(c17.x); | ||||
| 
 | ||||
| uint g_SpecConstants(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -1687,7 +1687,7 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi | |||
|         out += "\tconstant Texture3DDescriptorHeap& g_Texture3DDescriptorHeap [[buffer(1)]],\n"; | ||||
|         out += "\tconstant TextureCubeDescriptorHeap& g_TextureCubeDescriptorHeap [[buffer(2)]],\n"; | ||||
|         out += "\tconstant SamplerDescriptorHeap& g_SamplerDescriptorHeap [[buffer(3)]],\n"; | ||||
|         out += "\tconstant PushConstants& g_PushConstants [[buffer(8)]]\n"; | ||||
|         out += "\tconstant PushConstants& g_PushConstants [[buffer(4)]]\n"; | ||||
| 
 | ||||
|         out += "#else\n"; | ||||
| 
 | ||||
|  | @ -1705,7 +1705,7 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi | |||
|     else | ||||
|     { | ||||
|         out += "#ifdef __air__\n"; | ||||
|         out += "\tconstant PushConstants& g_PushConstants [[buffer(8)]],\n"; | ||||
|         out += "\tconstant PushConstants& g_PushConstants [[buffer(4)]],\n"; | ||||
|         out += "\tVertexShaderInput input [[stage_in]]\n"; | ||||
|         out += "#else\n"; | ||||
|         out += "\tVertexShaderInput input\n"; | ||||
|  | @ -2216,6 +2216,10 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi | |||
|                     out += "}\n"; | ||||
|                 #endif | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     out += "\toutput.oPos.xy += g_HalfPixelOffset * output.oPos.w;\n"; | ||||
|                 } | ||||
| 
 | ||||
|                 if (simpleControlFlow) | ||||
|                 { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue