Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/contentcreation/pps/MarkusWegmann/Godray Shader Proof of Concept/Blinn.cgbin @ 9387

Last change on this file since 9387 was 8708, checked in by marwegma, 13 years ago

My Stuff

File size: 3.8 KB
Line 
1!!ARBvp1.0
2OPTION NV_vertex_program3;
3# cgc version 2.0.0016, build date Jun  5 2008
4# command line args: -profile vp40 -I c:\users\markus wegmann\documents\fx composer 2\shader library\hlsl\include -I c:\users\markus wegmann\documents\fx composer 2\shader library\cgfx\include -I c:\users\markus wegmann\documents\fx composer 2\shader library\hlsl -I c:\users\markus wegmann\documents\fx composer 2\shader library\cgfx -I c:\program files (x86)\nvidia corporation\fx composer 2.5\media\hlsl\include -I c:\program files (x86)\nvidia corporation\fx composer 2.5\media\cgfx\include -I c:\users\markus wegmann\documents\fx composer 2\projects\godrays
5# source file: c:\users\markus wegmann\documents\fx composer 2\projects\godrays\Blinn.cgfx
6#vendor NVIDIA Corporation
7#version 2.0.0.16
8#profile vp40
9#program std_VS
10#semantic Script : STANDARDSGLOBAL
11#semantic WorldITXf : WorldInverseTranspose
12#semantic WvpXf : WorldViewProjection
13#semantic WorldXf : World
14#semantic ViewIXf : ViewInverse
15#semantic Lamp0Pos : Position
16#semantic Lamp0Color : Specular
17#semantic AmbiColor : Ambient
18#semantic Ks
19#semantic Eccentricity
20#semantic ColorTexture
21#semantic ColorSampler
22#var float3 IN.Position : $vin.POSITION : POSITION : 0 : 1
23#var float4 IN.UV : $vin.TEXCOORD0 : TEXCOORD0 : 0 : 1
24#var float4 IN.Normal : $vin.NORMAL : NORMAL : 0 : 1
25#var float4 IN.Tangent : $vin.TANGENT0 : ATTR14 : 0 : 1
26#var float4 IN.Binormal : $vin.BINORMAL0 : ATTR15 : 0 : 1
27#var float Script : STANDARDSGLOBAL :  : -1 : 0
28#var float4x4 WorldITXf : WorldInverseTranspose : c[0], 4 : -1 : 1
29#var float4x4 WvpXf : WorldViewProjection : c[4], 4 : -1 : 1
30#var float4x4 WorldXf : World : c[8], 4 : -1 : 1
31#var float4x4 ViewIXf : ViewInverse : c[12], 4 : -1 : 1
32#var float3 Lamp0Pos : Position : c[16] : -1 : 1
33#var float3 Lamp0Color : Specular :  : -1 : 0
34#var float3 AmbiColor : Ambient :  : -1 : 0
35#var float Ks :  :  : -1 : 0
36#var float Eccentricity :  :  : -1 : 0
37#var texture ColorTexture :  :  : -1 : 0
38#var sampler2D ColorSampler :  :  : -1 : 0
39#var float4 std_VS.HPosition : $vout.POSITION : HPOS : -1 : 1
40#var float2 std_VS.UV : $vout.TEXCOORD0 : TEX0 : -1 : 1
41#var float3 std_VS.LightVec : $vout.TEXCOORD1 : TEX1 : -1 : 1
42#var float3 std_VS.WorldNormal : $vout.TEXCOORD2 : TEX2 : -1 : 1
43#var float3 std_VS.WorldTangent : $vout.TEXCOORD3 : TEX3 : -1 : 1
44#var float3 std_VS.WorldBinormal : $vout.TEXCOORD4 : TEX4 : -1 : 1
45#var float3 std_VS.WorldView : $vout.TEXCOORD5 : TEX5 : -1 : 1
46#const c[17] = 1
47#default Script = 0.80000001
48#default Lamp0Pos = -0.5 2 1.25
49#default Lamp0Color = 1 1 1
50#default AmbiColor = 0.07 0.07 0.07
51#default Ks = 0.40000001
52#default Eccentricity = 0.30000001
53PARAM c[18] = { program.local[0..16],
54                { 1 } };
55TEMP R0;
56TEMP R1;
57TEMP R2;
58TEMP RC, HC;
59BB1:
60MOV   R1.w, c[17].x;
61MOV   R1.xyz, vertex.position;
62DP4   R2.z, R1, c[10];
63DP4   R2.y, R1, c[9];
64DP4   R2.x, R1, c[8];
65MOV   R0.x, c[12].w;
66MOV   R0.z, c[14].w;
67MOV   R0.y, c[13].w;
68ADD   R0.xyz, -R2, R0;
69DP3   R0.w, R0, R0;
70RSQ   R0.w, R0.w;
71MUL   result.texcoord[5].xyz, R0.w, R0;
72ADD   result.texcoord[1].xyz, c[16], -R2;
73DP4   result.position.w, R1, c[7];
74DP4   result.position.z, R1, c[6];
75DP4   result.position.y, R1, c[5];
76DP4   result.position.x, R1, c[4];
77MOV   result.texcoord[0].xy, vertex.texcoord[0];
78DP4   result.texcoord[2].z, vertex.normal, c[2];
79DP4   result.texcoord[2].y, vertex.normal, c[1];
80DP4   result.texcoord[2].x, vertex.normal, c[0];
81DP4   result.texcoord[3].z, vertex.attrib[14], c[2];
82DP4   result.texcoord[3].y, vertex.attrib[14], c[1];
83DP4   result.texcoord[3].x, vertex.attrib[14], c[0];
84DP4   result.texcoord[4].z, vertex.attrib[15], c[2];
85DP4   result.texcoord[4].y, vertex.attrib[15], c[1];
86DP4   result.texcoord[4].x, vertex.attrib[15], c[0];
87END
88# 27 instructions, 3 R-regs
Note: See TracBrowser for help on using the repository browser.