File: ex_prim_shader_vertex.hlsl

package info (click to toggle)
allegro5 2%3A5.2.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,820 kB
  • sloc: ansic: 109,795; cpp: 12,976; objc: 4,592; java: 2,845; python: 2,595; javascript: 1,238; sh: 1,008; makefile: 40; xml: 27; pascal: 24
file content (24 lines) | stat: -rw-r--r-- 564 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
struct VS_INPUT
{
   float4 Position  : POSITION0;
   float3 Normal    : TEXCOORD2;
};
struct VS_OUTPUT
{
   float4 Position       : POSITION0;
   /* pixel_position and normal are used to compute the reflections in the pixel shader */
   float3 PixelPosition  : TEXCOORD0;
   float3 Normal         : TEXCOORD1;
};

float4x4 al_projview_matrix;

VS_OUTPUT vs_main(VS_INPUT Input)
{
   VS_OUTPUT Output;

   Output.Position = mul(Input.Position, al_projview_matrix);
   Output.PixelPosition = Input.Position.xyz;
   Output.Normal = Input.Normal;
   return Output;
}