dx11test

view shader.hlsl @ 3:aa1497adac80

fixed line endings
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 21 Jun 2013 09:37:24 +0300
parents 647ba0689512
children
line source
1 cbuffer RenderState : register(b0) {
2 matrix modelview_matrix : packoffset(c0);
3 matrix projection_matrix : packoffset(c4);
4 };
6 struct VSInput {
7 float4 pos : POSITION;
8 float4 color : COLOR;
9 };
11 struct VSOutput {
12 float4 pos : SV_POSITION;
13 float4 color : COLOR0;
14 };
16 VSOutput vertex_main(VSInput input)
17 {
18 VSOutput res;
20 float4 vpos = mul(input.pos, modelview_matrix);
22 res.pos = mul(vpos, projection_matrix);
23 res.color = input.color;
24 return res;
25 }
28 float4 pixel_main(VSOutput input) : SV_TARGET
29 {
30 return input.color;
31 }