Merge pull request #1292 from ogniK5377/renderdoc-fix
Fixed renderdoc input/output textures not working due to multiple render targets
This commit is contained in:
		| @@ -1023,7 +1023,7 @@ private: | |||||||
|             // TODO(Subv): Figure out how dual-source blending is configured in the Switch. |             // TODO(Subv): Figure out how dual-source blending is configured in the Switch. | ||||||
|             for (u32 component = 0; component < 4; ++component) { |             for (u32 component = 0; component < 4; ++component) { | ||||||
|                 if (header.IsColorComponentOutputEnabled(render_target, component)) { |                 if (header.IsColorComponentOutputEnabled(render_target, component)) { | ||||||
|                     shader.AddLine(fmt::format("color[{}][{}] = {};", render_target, component, |                     shader.AddLine(fmt::format("FragColor{}[{}] = {};", render_target, component, | ||||||
|                                                regs.GetRegisterAsFloat(current_reg))); |                                                regs.GetRegisterAsFloat(current_reg))); | ||||||
|                     ++current_reg; |                     ++current_reg; | ||||||
|                 } |                 } | ||||||
|   | |||||||
| @@ -88,7 +88,14 @@ ProgramResult GenerateFragmentShader(const ShaderSetup& setup) { | |||||||
|             .get_value_or({}); |             .get_value_or({}); | ||||||
|     out += R"( |     out += R"( | ||||||
| in vec4 position; | in vec4 position; | ||||||
| layout(location = 0) out vec4 color[8]; | layout(location = 0) out vec4 FragColor0; | ||||||
|  | layout(location = 1) out vec4 FragColor1; | ||||||
|  | layout(location = 2) out vec4 FragColor2; | ||||||
|  | layout(location = 3) out vec4 FragColor3; | ||||||
|  | layout(location = 4) out vec4 FragColor4; | ||||||
|  | layout(location = 5) out vec4 FragColor5; | ||||||
|  | layout(location = 6) out vec4 FragColor6; | ||||||
|  | layout(location = 7) out vec4 FragColor7; | ||||||
|  |  | ||||||
| layout (std140) uniform fs_config { | layout (std140) uniform fs_config { | ||||||
|     vec4 viewport_flip; |     vec4 viewport_flip; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user