1 | // final pixel output: |
1 | // final pixel output: |
2 | // data from pixel shader to frame buffer |
2 | // data from pixel shader to frame buffer |
|
|
3 | struct vertexOut { |
|
|
4 | float4 HPosition : POSITION; |
|
|
5 | float4 TexCoord : TEXCOORD0; |
|
|
6 | float3 LightVec : TEXCOORD1; |
|
|
7 | float3 WorldNormal : TEXCOORD2; |
|
|
8 | float3 WorldPos : TEXCOORD3; |
|
|
9 | float3 WorldView : TEXCOORD4; |
|
|
10 | }; |
3 | |
11 | |
4 | struct pixelOut { |
12 | struct pixelOut { |
5 | float4 col : COLOR; |
13 | float4 col : COLOR; |
6 | }; |
14 | }; |
7 | // pixel shader |
15 | // pixel shader |
8 | pixelOut mainPS(vertexOut IN, // input from vertex shade |
16 | pixelOut main(vertexOut IN, // input from vertex shade |
9 | uniform float SpecExpon, // constant parameters fro |
17 | uniform float SpecExpon, // constant parameters fro |
10 | uniform float4 AmbiColor, // application |
18 | uniform float4 AmbiColor, // application |
11 | uniform float4 SurfColor, |
19 | uniform float4 SurfColor, |
12 | uniform float4 LightColor |
20 | uniform float4 LightColor |
13 | ) |
21 | ) |