dx11test
diff 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 diff
1.1 --- a/shader.hlsl Fri Jun 21 09:09:09 2013 +0300 1.2 +++ b/shader.hlsl Fri Jun 21 09:37:24 2013 +0300 1.3 @@ -1,31 +1,31 @@ 1.4 -cbuffer RenderState : register(b0) { 1.5 - matrix modelview_matrix : packoffset(c0); 1.6 - matrix projection_matrix : packoffset(c4); 1.7 -}; 1.8 - 1.9 -struct VSInput { 1.10 - float4 pos : POSITION; 1.11 - float4 color : COLOR; 1.12 -}; 1.13 - 1.14 -struct VSOutput { 1.15 - float4 pos : SV_POSITION; 1.16 - float4 color : COLOR0; 1.17 -}; 1.18 - 1.19 -VSOutput vertex_main(VSInput input) 1.20 -{ 1.21 - VSOutput res; 1.22 - 1.23 - float4 vpos = mul(input.pos, modelview_matrix); 1.24 - 1.25 - res.pos = mul(vpos, projection_matrix); 1.26 - res.color = input.color; 1.27 - return res; 1.28 -} 1.29 - 1.30 - 1.31 -float4 pixel_main(VSOutput input) : SV_TARGET 1.32 -{ 1.33 - return input.color; 1.34 +cbuffer RenderState : register(b0) { 1.35 + matrix modelview_matrix : packoffset(c0); 1.36 + matrix projection_matrix : packoffset(c4); 1.37 +}; 1.38 + 1.39 +struct VSInput { 1.40 + float4 pos : POSITION; 1.41 + float4 color : COLOR; 1.42 +}; 1.43 + 1.44 +struct VSOutput { 1.45 + float4 pos : SV_POSITION; 1.46 + float4 color : COLOR0; 1.47 +}; 1.48 + 1.49 +VSOutput vertex_main(VSInput input) 1.50 +{ 1.51 + VSOutput res; 1.52 + 1.53 + float4 vpos = mul(input.pos, modelview_matrix); 1.54 + 1.55 + res.pos = mul(vpos, projection_matrix); 1.56 + res.color = input.color; 1.57 + return res; 1.58 +} 1.59 + 1.60 + 1.61 +float4 pixel_main(VSOutput input) : SV_TARGET 1.62 +{ 1.63 + return input.color; 1.64 } 1.65 \ No newline at end of file