   [C++, DX9] Effect file (.fx) question
  Effect.fx I found:bmap bmp_normalizationcube=<normalize+6.tga>;bmap bmp_toonlookup=<toonlookup.tga>; function mtl_toon_init(){bmap_to_cubemap(mtl.skin1);}material mtl_toon{skin1=bmp_normalizationcube;skin2=bmp_toonlookup;event=mtl_toon_init;effect"texture entSkin1;texture mtlSkin1;texture mtlSkin2;matrix matWorldViewProj;matrix matWorld;vector vecSkill41;vector vecSunDir; technique toon{pass p0{texture[0]=<mtlSkin1>;texture[1]=<mtlSkin2>;texture[2]=<entSkin1>; addressU[1]=clamp; magFilter[2]=linear;minFilter[2]=linear;mipFilter[2]=linear;vertexShaderConstant[0]=<matWorldViewProj>;vertexShaderConstant[4]=<matWorld>; vertexShaderConstant[16]=<vecSunDir>; vertexShader=asm{vs.1.1  dcl_position v0dcl_normal v3dcl_texcoord0 v7dcl_texcoord1 v8m4x4 oPos,v0,c0  // transform position to clip spacem3x3 r0,v3,c4  // transform normal to world spacedp3 r0.w,r0,r0  // renormalize itrsq r0.w,r0.wmul r0,r0,r0.wmov oT0.xyz,r0.xyz  // output normal to oT0mov oT1.xyz,-c16    // output light direction to oT1mov oT2.xy,v7.xy    // output uvs to oT2};pixelShader=asm{ps.1.3tex t0    // fetch normalized normaltexdp3tex t1,t0_bx2 // light.normal=u -> use u to lookup in t1  // _bx2 -> 0..1 of normcube will be   -1..1  tex t2    // sample color mapmul r0,t2,t1    // modulate with shading};}pass p1{cullMode=cw;vertexShaderConstant[0]=<matWorldViewProj>;vertexShaderConstant[16]=<vecSkill41>; // outline_thickness, 0, 0, 0vertexShader=asm{vs.1.1dcl_position v0dcl_normal v3dcl_texcoord0 v7dcl_texcoord1 v8mov r0,v0mul r1,c16.x,v3  // scale normaladd r0.xyz,r0.xyz,r1.xyz  // shell offset   //(vertex position + scaled normal)m4x4 oPos,r0,c0  // transform position to clip space};pixelShader=asm{ps.1.3def c0,0,0,0,1  // outline rgba mov r0,c0 }; } }";}action toon{my.skill41=float(0.8); // outline_thicknessmy.material=mtl_toon;}I'm quite confused what's that function, material at the top, and action at the bottom. Maybe anyone could explain me please? Google didn't come up with any good results.   
  Looks like an engine-specific effect file.Some graphics/game engines like id-Tech5 make their own effect file format. If you look at Doom3's effect files (they have .fx extension like yours), you cannot understand anything like this one.   ;  Oh well. Will have to find different shader. Thank you.   