home *** CD-ROM | disk | FTP | other *** search
- !!FP1.0
- # NV_fragment_program generated by NVIDIA Cg compiler
- # cgc version 1.5.0001, build date Oct 15 2002 01:04:08
- # command line args: -profile fp30
- #vendor NVIDIA Corporation
- #version 1.0.1
- #profile fp30
- #program main
- #semantic main.skinColor_frontSpec
- #semantic main.skin_norm_sideSpec
- #semantic main.g_specular_colorShift
- #semantic main.g_blood_texture
- #semantic main.g_transmission_terms
- #semantic main.g_diffuse_Cube
- #semantic main.g_specular_Cube
- #semantic main.g_nrmalize_Cube
- #semantic main.g_dappleProjection
- #semantic main.g_hilight_Cube
- #var float4 v2f.skinColor_frontSpec : $vin.TEXCOORD0 : TEXCOORD0 : 0 : 1
- #var float3 v2f.worldEyeDir : $vin.TEXCOORD2 : TEXCOORD2 : 0 : 1
- #var float3 v2f.worldTanMatrixX : $vin.TEXCOORD5 : TEXCOORD5 : 0 : 1
- #var float3 v2f.worldTanMatrixY : $vin.TEXCOORD6 : TEXCOORD6 : 0 : 1
- #var float3 v2f.worldTanMatrixZ : $vin.TEXCOORD7 : TEXCOORD7 : 0 : 1
- #var float4 v2f.SkinSilouetteVec : $vin.TEXCOORD3 : TEXCOORD3 : 0 : 1
- #var samplerRECT skinColor_frontSpec : : texunit 0 : 1 : 1
- #var samplerRECT skin_norm_sideSpec : : texunit 1 : 2 : 1
- #var samplerRECT g_specular_colorShift : : texunit 2 : 3 : 1
- #var samplerRECT g_blood_texture : : texunit 3 : 4 : 1
- #var samplerRECT g_transmission_terms : : texunit 4 : 5 : 1
- #var samplerCUBE g_diffuse_Cube : : texunit 5 : 6 : 1
- #var samplerCUBE g_specular_Cube : : texunit 6 : 7 : 1
- #var samplerCUBE g_nrmalize_Cube : : texunit 7 : 8 : 1
- #var samplerRECT g_dappleProjection : : texunit 8 : 9 : 1
- #var samplerCUBE g_hilight_Cube : : texunit 9 : 10 : 1
- #var half4 COL : $vout.COLOR : COLOR : -1 : 1
-
- DEFINE LUMINANCE = {0.299, 0.587, 0.114, 0.0};
-
- ############################################################################################
- # These two blocks slow code down 10% #
- ############################################################################################
- TEX H0, f[TEX0], TEX1, 2D; # store range-compressed normal (and side spec) in H1
- TEX H1, f[TEX0], TEX0, 2D; # store skin color in H3
-
- DP3H H2.x, H0, f[TEX5];
- DP3H H2.y, H0, f[TEX6];
- DP3H H2.z, H0, f[TEX7]; # H2 now contains worldNormal - extinguish
-
- MOVH H0, f[TEX2]; # store v2f.world_V in H1
- DP3X H2.w, H0, H2; # H2.w = dot(Normal, View)
- MULX H2.xyz,-H2, -2; # twice the normal
- MADX H3.xyz, -H2, H2.w, H0; # H4 = -2*dot(H0, H2)*H2 + H0 = reflection vector. Normal doesn't need to be fixed, because it's uniformly scaled
-
- TEX H0, H2, TEX5, CUBE; # diffuse lighting
- TEX H2, H3, TEX9, CUBE; # direct specular lighting
-
- MULX H2.xyz, H2, 0.3; # const*spec
- MULX H0, H0, H1; # diffuse_map*diffuse
- MADX o[COLH], H0, 0.7, H2; # diffuse and spec
-
- END
-
- # End of program
-
-
-
-
-
-