Advertisement
Ember

Vertex Shader

Jan 15th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. //--------------------------------------------------------------------------------------
  2. // Vertex Shader
  3. //--------------------------------------------------------------------------------------
  4. void ColourVS(
  5.     float1x3 iPosition : POSITION,
  6.     float1x3 iNormal   : NORMAL,
  7.     float1x2 iUv       : TEXCOORD,
  8.     // output
  9.     out float3 oNormal   : NORMAL,
  10.     out float2 oUv       : TEXCOORD0,
  11.     out float4 oColor    : TEXCOORD1,
  12.     out float4 oPos      : TEXCOORD2,
  13.     out float4 oPosition : SV_POSITION)
  14. {
  15.     oPosition = mul(mul(mul(float4(iPosition, 1.0f), InstanceMatrix), WorldMatrix), ViewProjectionMatrix);
  16.     oUv = iUv;
  17.     oColor = vMeshColor;
  18.     oNormal = mul(iNormal, WorldMatrix);
  19.     oPos = oPosition;
  20.  
  21.     return;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement