192617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri/************************************************************************** 292617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * 392617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * Copyright 2010 Luca Barbieri 492617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * 592617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * Permission is hereby granted, free of charge, to any person obtaining 692617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * a copy of this software and associated documentation files (the 792617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * "Software"), to deal in the Software without restriction, including 892617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * without limitation the rights to use, copy, modify, merge, publish, 992617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * distribute, sublicense, and/or sell copies of the Software, and to 1092617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * permit persons to whom the Software is furnished to do so, subject to 1192617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * the following conditions: 1292617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * 1392617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * The above copyright notice and this permission notice (including the 1492617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * next paragraph) shall be included in all copies or substantial 1592617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * portions of the Software. 1692617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * 1792617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1892617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1992617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2092617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE 2192617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 2292617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 2392617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2492617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri * 2592617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri **************************************************************************/ 2692617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri 2792617aeac109481258f0c3863d09c1b8903d438bLuca Barbieristruct IA2VS 2892617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri{ 2992617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri float4 position : POSITION; 3092617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri float4 color : COLOR; 3192617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri}; 3292617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri 3392617aeac109481258f0c3863d09c1b8903d438bLuca Barbieristruct VS2PS 3492617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri{ 3592617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri float4 position : SV_POSITION; 3692617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri float4 color : COLOR; 3792617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri}; 3892617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri 3992617aeac109481258f0c3863d09c1b8903d438bLuca BarbieriVS2PS vs(IA2VS input) 4092617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri{ 4192617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri VS2PS result; 4292617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri result.position = input.position; 4392617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri result.color = input.color; 4492617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri return result; 4592617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri} 4692617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri 4792617aeac109481258f0c3863d09c1b8903d438bLuca Barbierifloat4 ps(VS2PS input) : SV_TARGET 4892617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri{ 4992617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri return input.color; 5092617aeac109481258f0c3863d09c1b8903d438bLuca Barbieri} 51