source: java/client_3D/static/shared/res/shaders/old_std.cg @ 105

Last change on this file since 105 was 65, checked in by Maciej Komosinski, 14 years ago

added sources of the 3D client for the Framsticks server

File size: 708 bytes
Line 
1#ifndef __STD_H
2#define __STD_H
3
4float4 vertex(uniform float4x4 modelViewProj,
5              uniform float4x4 modelView,
6              uniform float4x4 modelViewIT,
7              float4 P : POSITION,
8              float4 N : NORMAL,
9              float2 uvIn : TEXCOORD0,
10              out float4 CC : COLOR0,
11              out float3 Pcam : TEXCOORD1,
12              out float3 Ncam : TEXCOORD2,
13              out float2 uv : TEXCOORD0) : POSITION
14{
15    CC.xyz =  normalize(N.xyz);
16    Pcam = mul(modelView, P).xyz;
17    //Ncam = mul(modelViewIT, N).xyz;
18    float3x3 rotation = (float3x3)modelView;
19    Ncam.xyz = mul(rotation,N.xyz);
20   
21    uv = uvIn;
22    return mul(modelViewProj, P);
23}
24
25#endif
Note: See TracBrowser for help on using the repository browser.