Skip to main content
added 4 characters in body
Source Link
János Turánszki
  • 3.1k
  • 3
  • 16
  • 22

Maybe you can save some time if you don't bind a vertex buffer and use SV_VERTEXID (which is created automatically by the IA stage) to build your quad in the vertex shader, something like:

struct VSOUT{
 float4 pos:SV_POSITION;
 float2 tex:TEXCOORD0;
};

VSOUT main(uint vI: SV_VERTEXID)
{
 VSOUT Out = VSOUT(0);
 Out.tex=float2(vI%2,vI%4/2);
 Out.pos=float4((inTexOut.tex.x-0.5f)*2,-(inTexOut.tex.y-0.5f)*2,0,1);
 return Out;
}

The vertex shader will output a full screen quad this way if you call a draw for 4 vertices with a TRIANGLESTRIP topology;

Probably you can also save some time if you try out different rendertarget formats and resoulutions.

If you can have depth or stencil testing it can also save you some time in some scenarios.

Maybe you can save some time if you don't bind a vertex buffer and use SV_VERTEXID (which is created automatically by the IA stage) to build your quad in the vertex shader, something like:

struct VSOUT{
 float4 pos:SV_POSITION;
 float2 tex:TEXCOORD0;
};

VSOUT main(uint vI: SV_VERTEXID)
{
 VSOUT Out = VSOUT(0);
 Out.tex=float2(vI%2,vI%4/2);
 Out.pos=float4((inTex.x-0.5f)*2,-(inTex.y-0.5f)*2,0,1);
 return Out;
}

The vertex shader will output a full screen quad this way if you call a draw for 4 vertices with a TRIANGLESTRIP topology;

Probably you can also save some time if you try out different rendertarget formats and resoulutions.

If you can have depth or stencil testing it can also save you some time in some scenarios.

Maybe you can save some time if you don't bind a vertex buffer and use SV_VERTEXID (which is created automatically by the IA stage) to build your quad in the vertex shader, something like:

struct VSOUT{
 float4 pos:SV_POSITION;
 float2 tex:TEXCOORD0;
};

VSOUT main(uint vI: SV_VERTEXID)
{
 VSOUT Out = VSOUT(0);
 Out.tex=float2(vI%2,vI%4/2);
 Out.pos=float4((Out.tex.x-0.5f)*2,-(Out.tex.y-0.5f)*2,0,1);
 return Out;
}

The vertex shader will output a full screen quad this way if you call a draw for 4 vertices with a TRIANGLESTRIP topology;

Probably you can also save some time if you try out different rendertarget formats and resoulutions.

If you can have depth or stencil testing it can also save you some time in some scenarios.

edited body
Source Link
János Turánszki
  • 3.1k
  • 3
  • 16
  • 22

Maybe you can save some time if you don't bind a vertex buffer and use SV_VERTEXID (which is createscreated automatically by the IA stage) to build your quad in the vertex shader, something like:

struct VSOUT{
 float4 pos:SV_POSITION;
 float2 tex:TEXCOORD0;
};

VSOUT main(uint vI: SV_VERTEXID)
{
 VSOUT Out = VSOUT(0);
 Out.tex=float2(vI%2,vI%4/2);
 Out.pos=float4((inTex.x-0.5f)*2,-(inTex.y-0.5f)*2,0,1);
 return Out;
}

The vertex shader will output a full screen quad this way if you call a draw for 4 vertices with a TRIANGLESTRIP topology;

Probably you can also save some time if you try out different rendertarget formats and resoulutions.

If you can have depth or stencil testing it can also save you some time in some scenarios.

Maybe you can save some time if you don't bind a vertex buffer and use SV_VERTEXID (which is creates automatically by the IA stage) to build your quad in the vertex shader, something like:

struct VSOUT{
 float4 pos:SV_POSITION;
 float2 tex:TEXCOORD0;
};

VSOUT main(uint vI: SV_VERTEXID)
{
 VSOUT Out = VSOUT(0);
 Out.tex=float2(vI%2,vI%4/2);
 Out.pos=float4((inTex.x-0.5f)*2,-(inTex.y-0.5f)*2,0,1);
 return Out;
}

The vertex shader will output a full screen quad this way if you call a draw for 4 vertices with a TRIANGLESTRIP topology;

Probably you can also save some time if you try out different rendertarget formats and resoulutions.

If you can have depth or stencil testing it can also save you some time in some scenarios.

Maybe you can save some time if you don't bind a vertex buffer and use SV_VERTEXID (which is created automatically by the IA stage) to build your quad in the vertex shader, something like:

struct VSOUT{
 float4 pos:SV_POSITION;
 float2 tex:TEXCOORD0;
};

VSOUT main(uint vI: SV_VERTEXID)
{
 VSOUT Out = VSOUT(0);
 Out.tex=float2(vI%2,vI%4/2);
 Out.pos=float4((inTex.x-0.5f)*2,-(inTex.y-0.5f)*2,0,1);
 return Out;
}

The vertex shader will output a full screen quad this way if you call a draw for 4 vertices with a TRIANGLESTRIP topology;

Probably you can also save some time if you try out different rendertarget formats and resoulutions.

If you can have depth or stencil testing it can also save you some time in some scenarios.

added 49 characters in body
Source Link
János Turánszki
  • 3.1k
  • 3
  • 16
  • 22

Maybe you can save some time if you don't bind a vertex buffer and use SV_VERTEXID (which is creates automatically by the IA stage) to build your quad in the vertex shader, something like:

struct VSOUT{
 float4 pos:SV_POSITION;
 float2 tex:TEXCOORD0;
};

VSOUT main(uint vI: SV_VERTEXID)
{
 VSOUT Out = VSOUT(0);
 Out.tex=float2(vI%2,vI%4/2);
 Out.pos=float4((inTex.x-0.5f)*2,-(inTex.y-0.5f)*2,0,1);
 return Out;
}

The vertex shader will output a full screen quad this way if you call a draw for 4 vertices with a TRIANGLESTRIP topology;

Probably you can also save some time if you try out different rendertarget formats and resoulutions.

If you can have depth or stencil testing it can also save you some time in some scenarios.

Maybe you can save some time if you don't bind a vertex buffer and use SV_VERTEXID to build your quad in the vertex shader, something like:

struct VSOUT{
 float4 pos:SV_POSITION;
 float2 tex:TEXCOORD0;
};

VSOUT main(uint vI: SV_VERTEXID)
{
 VSOUT Out = VSOUT(0);
 Out.tex=float2(vI%2,vI%4/2);
 Out.pos=float4((inTex.x-0.5f)*2,-(inTex.y-0.5f)*2,0,1);
 return Out;
}

The vertex shader will output a full screen quad this way if you call a draw for 4 vertices with a TRIANGLESTRIP topology;

Probably you can also save some time if you try out different rendertarget formats and resoulutions.

If you can have depth or stencil testing it can also save you some time in some scenarios.

Maybe you can save some time if you don't bind a vertex buffer and use SV_VERTEXID (which is creates automatically by the IA stage) to build your quad in the vertex shader, something like:

struct VSOUT{
 float4 pos:SV_POSITION;
 float2 tex:TEXCOORD0;
};

VSOUT main(uint vI: SV_VERTEXID)
{
 VSOUT Out = VSOUT(0);
 Out.tex=float2(vI%2,vI%4/2);
 Out.pos=float4((inTex.x-0.5f)*2,-(inTex.y-0.5f)*2,0,1);
 return Out;
}

The vertex shader will output a full screen quad this way if you call a draw for 4 vertices with a TRIANGLESTRIP topology;

Probably you can also save some time if you try out different rendertarget formats and resoulutions.

If you can have depth or stencil testing it can also save you some time in some scenarios.

Source Link
János Turánszki
  • 3.1k
  • 3
  • 16
  • 22
Loading