Advertisement

One question about MRT

Started by June 01, 2020 08:46 AM
2 comments, last by kirillisme 4 years, 8 months ago

Hi,

I have a question about MRT.

Let's say i have a shader with MRT output, something like this:

struct PixelOutput
{
	float4 color0 : COLOR0;
	float4 color1 : COLOR1;
};

PixelOutput pixelShader(Input in)
{
	float4 color = 1.0;
	
	PixelOutput output;
	output.color0 = color;
	output.color1 = color;
	return output;
}

But what if i just have only one RenderTarget is active? What the GPU would do when it couldn't find enough RenderTargets as it should have?

Basically nothing… it will only write to the targets that are available…the other output goes nowhere. AFAIK…

Advertisement

Yeah, the DirectX 11 will emit a ‘safe’ warning about it, at the same time, it will discard the other output(s). (mjp)

This topic is closed to new replies.

Advertisement