//´ÙÀÌ·ºÆ® X ÀνºÅç Æú´õ\Samples\Media\EffectEdit // Sample effect file // Here is a texture parameter texture tex0 < string name = "tiger\\tiger.bmp"; >; // Here is a vector parameter representing the direction // vector from a light source. The UIDirectional annotation // tells EffectEdit to create a user interface element that can // be used to interactively change the light direction. float3 lightDir < string UIDirectional = "Light Direction"; > = {0.577, -0.577, 0.577}; string XFile = "tiger\\tiger.x"; // Model to load string BIMG = "misc\\lake.bmp"; // Background image DWORD BCLR = 0xff202080; // Background color (if no image) technique tec0 { pass p0 { // Set up reasonable material defaults MaterialAmbient = {1.0, 1.0, 1.0, 1.0}; MaterialDiffuse = {1.0, 1.0, 1.0, 1.0}; MaterialSpecular = {1.0, 1.0, 1.0, 1.0}; MaterialPower = 40.0f; // Set up one directional light LightType[0] = DIRECTIONAL; LightDiffuse[0] = {1.0, 1.0, 1.0, 1.0}; LightSpecular[0] = {1.0, 1.0, 1.0, 1.0}; LightAmbient[0] = {0.1, 0.1, 0.1, 1.0}; LightDirection[0] = ; // Use the vector parameter defined above LightRange[0] = 100000.0; // Turn lighting on and use light 0 LightEnable[0] = True; Lighting = True; SpecularEnable = True; // Set up texture stage 0 Texture[0] = ; // Use the texture parameter defined above ColorOp[0] = Modulate; ColorArg1[0] = Texture; ColorArg2[0] = Diffuse; AlphaOp[0] = Modulate; AlphaArg1[0] = Texture; AlphaArg2[0] = Diffuse; MinFilter[0] = Linear; MagFilter[0] = Linear; MipFilter[0] = Linear; // Disable texture stage 1 ColorOp[1] = Disable; AlphaOp[1] = Disable; PixelShader = asm { ps_1_1 def c2, 0.333f, 0.59f, 0.11f, 0.0f tex t0 dp3 r0, t0, c2 }; } }