1/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6#include "common-vs.hlsl"
7#include "color-common.hlsl"
8
9struct VS_INPUT {
10  float2 vPos : POSITION;
11};
12
13cbuffer Buffer0 : register(b0) {
14  float4 aValue0;
15};
16cbuffer Buffer1 : register(b1) {
17  float4 aValue1;
18};
19cbuffer Buffer2 : register(b2) {
20  float4 aValue2;
21};
22
23VS_COLOROUTPUT_CLIPPED TestConstantBuffersVS(VS_INPUT aInput)
24{
25  // Draw to the entire viewport.
26  float2 pos = UnitQuadToRect(aInput.vPos, float4(-1, -1, 2, 2));
27
28  VS_COLOROUTPUT_CLIPPED output;
29  output.vPosition = float4(pos, 0, 1);
30  output.vColor = float4(aValue0.r, aValue1.g, aValue2.b, 1.0);
31  return output;
32}
33