PageRenderTime 39ms CodeModel.GetById 19ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/Resources/HLSL9/Lighting.hlslv

http://github.com/Akranar/daguerreo
Unknown | 43 lines | 38 code | 5 blank | 0 comment | 0 complexity | 3fd788af0b37d607039ee8eefeafb9de MD5 | raw file
Possible License(s): AGPL-3.0, LGPL-2.1, LGPL-3.0, GPL-2.0
 1// hlslv output by Cg compiler
 2// cgc version 3.0.0016, build date Feb 11 2011
 3// command line args: -profile hlslv
 4// source file: Lighting.cg
 5//vendor NVIDIA Corporation
 6//version 3.0.0.16
 7//profile hlslv
 8//program MainV
 9//semantic MainV.ModelViewProjMatrix
10//semantic MainV.ModelMatrix
11//var float4x4 ModelViewProjMatrix :  : _ModelViewProjMatrix[0], 4 : 5 : 1
12//var float4x4 ModelMatrix :  : _ModelMatrix[0], 4 : 6 : 1
13//var float4 position : $vin.POSITION : POSITION : 0 : 1
14//var float3 normal : $vin.NORMAL : NORMAL : 1 : 1
15//var float4 out_position : $vout.POSITION : POSITION : 2 : 1
16//var float3 world_position : $vout.TEXCOORD0 : TEXCOORD0 : 3 : 1
17//var float3 out_normal : $vout.TEXCOORD1 : TEXCOORD1 : 4 : 1
18
19#pragma pack_matrix(row_major)
20
21float4 _r0003;
22float4 _r0005;
23float3 _r0007;
24
25 // main procedure, the original name was MainV
26void main(in float4 _position : POSITION, in float3 _normal : NORMAL, out float4 _out_position : POSITION, out float3 _world_position : TEXCOORD0, out float3 _out_normal : TEXCOORD1, uniform float4x4 _ModelViewProjMatrix, uniform float4x4 _ModelMatrix)
27{
28
29
30    _r0003.x = dot(_ModelViewProjMatrix._11_12_13_14, _position);
31    _r0003.y = dot(_ModelViewProjMatrix._21_22_23_24, _position);
32    _r0003.z = dot(_ModelViewProjMatrix._31_32_33_34, _position);
33    _r0003.w = dot(_ModelViewProjMatrix._41_42_43_44, _position);
34    _out_position = _r0003;
35    _r0005.x = dot(_ModelMatrix._11_12_13_14, _position);
36    _r0005.y = dot(_ModelMatrix._21_22_23_24, _position);
37    _r0005.z = dot(_ModelMatrix._31_32_33_34, _position);
38    _world_position = _r0005.xyz;
39    _r0007.x = dot(_ModelMatrix._11_12_13, _normal);
40    _r0007.y = dot(_ModelMatrix._21_22_23, _normal);
41    _r0007.z = dot(_ModelMatrix._31_32_33, _normal);
42    _out_normal = _r0007;
43} // main end