2
# S3O model rendering without shadows
5
TEMP temp,reflect,texColor,extraColor,specular;
6
TEMP tempColor,shadeColor;
9
TEX texColor, fragment.texcoord[1], texture[0], 2D;
10
TEX extraColor, fragment.texcoord[1], texture[1], 2D;
12
#normalize surface normal
13
DP3 temp.x, fragment.texcoord[2], fragment.texcoord[2];
15
MUL temp, fragment.texcoord[2], temp.x;
18
DP3 reflect.x, temp, fragment.texcoord[3];
19
MUL reflect.x, reflect.x,{-2};
20
MAD reflect, temp, reflect.x, fragment.texcoord[3];
22
#get specular highlight and remove if in shadow
23
TEX specular, reflect, texture[4], CUBE;
24
MUL specular, specular, {4,4,4,1};
25
MUL specular, specular, extraColor.y;
27
TEX reflect, reflect, texture[3], CUBE;
28
LRP shadeColor, extraColor.y, reflect, fragment.color;
29
LRP texColor, texColor.w, program.env[14], texColor;
30
ADD shadeColor, shadeColor, extraColor.x;
32
MAD result.color, texColor, shadeColor, specular;
33
MUL result.color.w, extraColor.w, program.env[14].w;
b'\\ No newline at end of file'