src/video/windowsrt/SimpleVertexShader.hlsl
author David Ludwig <dludwig@pobox.com>
Sun, 28 Oct 2012 20:47:33 -0400
changeset 8332 ea83d191cc17
parent 8322 839cd578a474
child 8346 a15d524f1d2e
permissions -rw-r--r--
WinRT: added mouse button event support
     1 cbuffer ModelViewProjectionConstantBuffer : register(b0)
     2 {
     3 	matrix model;
     4 	matrix view;
     5 	matrix projection;
     6 };
     7 
     8 struct VertexShaderInput
     9 {
    10 	float3 pos : POSITION;
    11 	float3 color : COLOR0;
    12 };
    13 
    14 struct VertexShaderOutput
    15 {
    16 	float4 pos : SV_POSITION;
    17 	float3 color : COLOR0;
    18 };
    19 
    20 VertexShaderOutput main(VertexShaderInput input)
    21 {
    22 	VertexShaderOutput output;
    23 	float4 pos = float4(input.pos, 1.0f);
    24 
    25 	// Transform the vertex position into projected space.
    26 	pos = mul(pos, model);
    27 	pos = mul(pos, view);
    28 	pos = mul(pos, projection);
    29 	output.pos = pos;
    30 
    31 	// Pass through the color without modification.
    32 	output.color = input.color;
    33 
    34 	return output;
    35 }