Add test for the instance param (geometry shader)
This commit is contained in:
parent
e314891598
commit
353ef3ac3e
2 changed files with 19 additions and 1 deletions
17
Test/hlsl.instance.geom
Normal file
17
Test/hlsl.instance.geom
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
struct VertexShaderOutput
|
||||
{
|
||||
float4 m_position : SV_POSITION;
|
||||
float4 m_color : COLOR0;
|
||||
};
|
||||
|
||||
[maxvertexcount(3)]
|
||||
[instance(5)]
|
||||
void GeometryShader(triangle VertexShaderOutput input[3], inout TriangleStream<VertexShaderOutput> output, uint id : SV_GSInstanceID)
|
||||
{
|
||||
[loop]
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
output.Append(input[i]);
|
||||
}
|
||||
output.RestartStrip();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue