📄 unit_genshadow.vp
字号:
!!ARBvp1.0
# vertex program for generating the shadow buffer
ATTRIB pos = vertex.position;
PARAM mat[4] = { state.matrix.projection };
PARAM mat2[4] = { state.matrix.modelview };
OUTPUT opos = result.position;
TEMP temp,temp2;
DP4 temp.x, pos, mat2[0];
DP4 temp.y, pos, mat2[1];
ABS temp2,temp;
ADD temp2,temp2,program.env[17];
RSQ temp2.x, temp2.x;
RSQ temp2.y, temp2.y;
ADD temp2,temp2,program.env[18];
MAD temp, temp, temp2,program.env[16];
DP4 temp.z, pos, mat2[2];
DP4 temp.w, pos, mat2[3];
DP4 opos.x, temp, mat[0];
DP4 opos.y, temp, mat[1];
DP4 opos.z, temp, mat[2];
DP4 opos.w, temp, mat[3];
#need texture coord for alpha testing (to shadow masked texels correctly)
MOV result.texcoord[0], vertex.texcoord[0];
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -