blob: 57027c989a5ae142431cbffdf9960eb49afee0a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
struct VSOutput
{
float4 position : SV_Position;
float3 color : COLOR0;
};
[shader("vertex")]
VSOutput vertexMain(uint vid : SV_VertexID)
{
float2 p = float2(float((vid << 1) & 2), float(vid & 2));
VSOutput output;
output.position = float4(p * 2.0 - 1.0, 0.0, 1.0);
output.color = float3(p, 0.5);
return output;
}
[shader("fragment")]
float4 fragmentMain(VSOutput input) : SV_Target
{
return float4(input.color, 1.0);
}
|