|
|

楼主 |
发表于 2004-11-14 15:23:00
|
显示全部楼层
Re:DOOM 3的渲染问题,熟悉GL的帮忙
# perform the diffuse bump mapping
#-----------------
TEX light, fragment.texcoord[0], texture[0], CUBE;
MAD light, light, scaleTwo, subOne;
# instead of using the normalization cube map, normalize with math
#DP3 light, fragment.texcoord[0],fragment.texcoord[0];
#RSQ light, light.x;
#MUL light, light.x, fragment.texcoord[0];
#-----------------
TEX localNormal, fragment.texcoord[1], texture[1], 2D;
MOV localNormal.x, localNormal.a;
MAD localNormal, localNormal, scaleTwo, subOne;
DP3 light, light, localNormal;
# modulate by the light projection
TXP R1, fragment.texcoord[3], texture[3], 2D;
MUL light, light, R1;
# modulate by the light falloff
TXP R1, fragment.texcoord[2], texture[2], 2D;
MUL light, light, R1;
|
|