87 lines
2.7 KiB
Text
87 lines
2.7 KiB
Text
|
!!ARBfp1.0
|
||
|
# cgc version 1.3.0001, build date Aug 4 2004 10:01:10
|
||
|
# command line args: -profile arbfp1
|
||
|
# source file: ..\..\setup\data\tools\gl\lighting_DBS_XY_Z_arbfp1.cg
|
||
|
# source file: ..\..\setup\data\tools\gl/utils.cg
|
||
|
#vendor NVIDIA Corporation
|
||
|
#version 1.0.02
|
||
|
#profile arbfp1
|
||
|
#program main
|
||
|
#semantic main.diffusemap
|
||
|
#semantic main.bumpmap
|
||
|
#semantic main.specularmap
|
||
|
#semantic main.attenuationmap_xy
|
||
|
#semantic main.attenuationmap_z
|
||
|
#semantic main.view_origin
|
||
|
#semantic main.light_origin
|
||
|
#semantic main.light_color
|
||
|
#semantic main.bump_scale
|
||
|
#semantic main.specular_exponent
|
||
|
#var float4 IN.position : $vin.TEX0 : TEX0 : 0 : 1
|
||
|
#var float4 IN.tex_diffuse_bump : $vin.TEX1 : TEX1 : 0 : 1
|
||
|
#var float4 IN.tex_specular : $vin.TEX2 : TEX2 : 0 : 1
|
||
|
#var float4 IN.tex_atten_xy_z : $vin.TEX3 : TEX3 : 0 : 1
|
||
|
#var float3 IN.tangent : $vin.TEX4 : TEX4 : 0 : 1
|
||
|
#var float3 IN.binormal : $vin.TEX5 : TEX5 : 0 : 1
|
||
|
#var float3 IN.normal : $vin.TEX6 : TEX6 : 0 : 1
|
||
|
#var sampler2D diffusemap : : texunit 0 : 1 : 1
|
||
|
#var sampler2D bumpmap : : texunit 1 : 2 : 1
|
||
|
#var sampler2D specularmap : : texunit 2 : 3 : 1
|
||
|
#var sampler2D attenuationmap_xy : : texunit 3 : 4 : 1
|
||
|
#var sampler2D attenuationmap_z : : texunit 4 : 5 : 1
|
||
|
#var float3 view_origin : : c[4] : 6 : 1
|
||
|
#var float3 light_origin : : c[2] : 7 : 1
|
||
|
#var float3 light_color : : c[3] : 8 : 1
|
||
|
#var float bump_scale : : c[1] : 9 : 1
|
||
|
#var float specular_exponent : : c[5] : 10 : 1
|
||
|
#var float4 main.color : $vout.COL : COL : -1 : 1
|
||
|
#const c[0] = 0.5 2 0
|
||
|
PARAM c[6] = { { 0.5, 2, 0 },
|
||
|
program.local[1..5] };
|
||
|
TEMP R0;
|
||
|
TEMP R1;
|
||
|
TEMP R2;
|
||
|
ADD R1.xyz, -fragment.texcoord[0], c[2];
|
||
|
DP3 R0.z, fragment.texcoord[6], R1;
|
||
|
DP3 R0.x, fragment.texcoord[4], R1;
|
||
|
DP3 R0.y, fragment.texcoord[5], R1;
|
||
|
ADD R1.xyz, -fragment.texcoord[0], c[4];
|
||
|
DP3 R0.w, R0, R0;
|
||
|
DP3 R2.z, fragment.texcoord[6], R1;
|
||
|
DP3 R2.x, fragment.texcoord[4], R1;
|
||
|
DP3 R2.y, fragment.texcoord[5], R1;
|
||
|
RSQ R0.w, R0.w;
|
||
|
MUL R1.xyz, R0.w, R0;
|
||
|
DP3 R1.w, R2, R2;
|
||
|
RSQ R0.w, R1.w;
|
||
|
MUL R2.xyz, R0.w, R2;
|
||
|
ADD R2.xyz, R1, R2;
|
||
|
DP3 R0.w, R2, R2;
|
||
|
RSQ R2.w, R0.w;
|
||
|
TEX R0.xyz, fragment.texcoord[1].zwzw, texture[1], 2D;
|
||
|
ADD R0.xyz, R0, -c[0].x;
|
||
|
MUL R0.xyz, R0, c[0].y;
|
||
|
MUL R0.z, R0, c[1].x;
|
||
|
DP3 R1.w, R0, R0;
|
||
|
RSQ R0.w, R1.w;
|
||
|
MUL R0.xyz, R0.w, R0;
|
||
|
MUL R2.xyz, R2.w, R2;
|
||
|
DP3_SAT R0.w, R0, R2;
|
||
|
DP3_SAT R0.x, R0, R1;
|
||
|
TEX R2.xyz, fragment.texcoord[2], texture[2], 2D;
|
||
|
MUL R1.xyz, R2, c[3];
|
||
|
POW R0.w, R0.w, c[5].x;
|
||
|
MUL R2.xyz, R1, R0.w;
|
||
|
MUL R1.xyz, R0.x, c[3];
|
||
|
TEX R0, fragment.texcoord[1], texture[0], 2D;
|
||
|
MAD R2.xyz, R0, R1, R2;
|
||
|
TXP R0.xyz, fragment.texcoord[3], texture[3], 2D;
|
||
|
MOV R1.y, c[0].z;
|
||
|
MOV R1.x, fragment.texcoord[3].z;
|
||
|
TEX R1.xyz, R1, texture[4], 2D;
|
||
|
MUL R0.xyz, R2, R0;
|
||
|
MUL result.color.xyz, R0, R1;
|
||
|
MOV result.color.w, R0;
|
||
|
END
|
||
|
# 41 instructions, 3 R-regs
|