home *** CD-ROM | disk | FTP | other *** search
- //
- // Standard texture effect
- // Copyright (c) 2000 Microsoft Corporation. All rights reserved.
- //
-
- vector vClr; // color
-
- vector vScl;
-
- matrix mWld; // World
- matrix mTot; // Total
-
- matrix mWd1;
- matrix mWd2;
- matrix mWd3;
- matrix mWd4;
- matrix mWd5;
- matrix mWd6;
- matrix mWd7;
- matrix mWd8;
- matrix mWd9;
- matrix mWd10;
- matrix mWd11;
- matrix mWd12;
- matrix mWd13;
- matrix mWd14;
- matrix mWd15;
- matrix mWd16;
- matrix mWd17;
- matrix mWd18;
- matrix mWd19;
- matrix mWd20;
- matrix mWd21;
- matrix mWd22;
- matrix mWd23;
- matrix mWd24;
- matrix mWd25;
- matrix mWd26;
- matrix mWd27;
- matrix mWd28;
-
- Vertexshader vNonIndexed =
- decl
- {
- stream 0;
-
- float v0[3];
- float v1[4];
- float v3[3];
- }
- asm
- {
- vs.1.0
-
- m4x3 r0,v0,c0
- m4x3 r1,v0,c4
- m4x3 r2,v0,c8
- m4x3 r3,v0,c12
-
- mul r0,r0,v1.xxxx
- mad r0,r1,v1.yyyy,r0
- mad r0,r2,v1.zzzz,r0
- mad r0,r3,v1.wwww,r0
-
- m3x3 r4,v3,c0
- m3x3 r5,v3,c4
- m3x3 r6,v3,c8
- m3x3 r7,v3,c12
-
- mul r4,r4,v1.xxxx
- mad r4,r5,v1.yyyy,r4
- mad r4,r6,v1.zzzz,r4
- mad r4,r7,v1.wwww,r4
-
- mad r0,r4,c21.xxxx,r0
-
- mov r0.w,c20.x
- m4x4 oPos,r0,c16
-
- mov oD0,c22
- };
-
-
- Vertexshader vIndexed =
- decl
- {
- stream 0;
-
- float v0[3];
- float v1[4];
- d3dcolor v2[1];
- float v3[3];
- }
- asm
- {
- vs.1.1
-
- // Compensate for lack of UBYTE4 on Geforce3
- mul r8,v2.zyxw,c4.wwww
-
- mov a0.x,r8.x
- m4x3 r0,v0,c[a0.x + 9]
- m3x3 r4,v3,c[a0.x + 9]
- mov a0.x,r8.y
- m4x3 r1,v0,c[a0.x + 9]
- m3x3 r5,v3,c[a0.x + 9]
- mov a0.x,r8.z
- m4x3 r2,v0,c[a0.x + 9]
- m3x3 r6,v3,c[a0.x + 9]
- mov a0.x,r8.w
- m4x3 r3,v0,c[a0.x + 9]
- m3x3 r7,v3,c[a0.x + 9]
-
- mul r0,r0,v1.xxxx
- mad r0,r1,v1.yyyy,r0
- mad r0,r2,v1.zzzz,r0
- mad r0,r3,v1.wwww,r0
-
- mul r4,r4,v1.xxxx
- mad r4,r5,v1.yyyy,r4
- mad r4,r6,v1.zzzz,r4
- mad r4,r7,v1.wwww,r4
-
- mad r0,r4,c6.xxxx,r0
-
- mov r0.w,c4.x
- m4x4 oPos,r0,c0
-
- mov oD0,c5
- };
-
- technique NonIndexed
- {
- pass P0
- {
- ColorVertex = FALSE;
-
- ColorOp[0] = Disable;
- AlphaOp[0] = Disable;
-
- VertexShader = <vNonIndexed>;
-
- VertexShaderConstant[0] = <mWd1>;
- VertexShaderConstant[4] = <mWd2>;
- VertexShaderConstant[8] = <mWd3>;
- VertexShaderConstant[12] = <mWd4>;
- VertexShaderConstant[16] = <mTot>;
- VertexShaderConstant[20] = (1.0f, 0.0f, 0.0f, 0.0f);
- VertexShaderConstant[21] = <vScl>;
- VertexShaderConstant[22] = <vClr>;
- }
- }
-
- technique Indexed
- {
- pass P0
- {
- ColorVertex = FALSE;
-
- ColorOp[0] = Disable;
- AlphaOp[0] = Disable;
-
- VertexShader = <vIndexed>;
-
- VertexShaderConstant[0] = <mTot>;
- VertexShaderConstant[4] = ( 1.0f, 0.0f, 0.0f, 765.01f );
- VertexShaderConstant[5] = <vClr>;
- VertexShaderConstant[6] = <vScl>;
-
- VertexShaderConstant3[9] = <mWd1>;
- VertexShaderConstant3[12] = <mWd2>;
- VertexShaderConstant3[15] = <mWd3>;
- VertexShaderConstant3[18] = <mWd4>;
- VertexShaderConstant3[21] = <mWd5>;
- VertexShaderConstant3[24] = <mWd6>;
- VertexShaderConstant3[27] = <mWd7>;
- VertexShaderConstant3[30] = <mWd8>;
- VertexShaderConstant3[33] = <mWd9>;
- VertexShaderConstant3[36] = <mWd10>;
- VertexShaderConstant3[39] = <mWd11>;
- VertexShaderConstant3[42] = <mWd12>;
- VertexShaderConstant3[45] = <mWd13>;
- VertexShaderConstant3[48] = <mWd14>;
- VertexShaderConstant3[51] = <mWd15>;
- VertexShaderConstant3[54] = <mWd16>;
- VertexShaderConstant3[57] = <mWd17>;
- VertexShaderConstant3[60] = <mWd18>;
- VertexShaderConstant3[63] = <mWd19>;
- VertexShaderConstant3[66] = <mWd20>;
- VertexShaderConstant3[69] = <mWd21>;
- VertexShaderConstant3[72] = <mWd22>;
- VertexShaderConstant3[75] = <mWd23>;
- VertexShaderConstant3[78] = <mWd24>;
- VertexShaderConstant3[81] = <mWd25>;
- VertexShaderConstant3[84] = <mWd26>;
- VertexShaderConstant3[87] = <mWd27>;
- VertexShaderConstant3[90] = <mWd28>;
- }
- }
-
-