|
|

楼主 |
发表于 2006-8-1 11:34:00
|
显示全部楼层
Re:再请教个问题:固定功能流水线下如何指定用于cubic env
SetTransform World应该会自动把顶点法线变换了吧?现在不管我的摄像机在什么位置,他反射出来的都好像实在-Z轴上某处看到的样子,到底怎么回事????
technique FixedFunc
{
pass p0
{
// Set up reasonable material defaults
MaterialAmbient = {0.0, 0.0, 0.0, 0.0};
MaterialDiffuse = {0.9, 0.9, 0.9, 0.0};
MaterialSpecular = {1.0, 1.0, 1.0, 1.0};
MaterialPower = 10.0f;
//
NormalizeNormals = true;
// 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.0, 0.0, 0.0, 1.0};
LightDirection[0] = <lightDir>; // 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] = <texDiffuse>; // 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;
TexCoordIndex[0] = PassThru;
// Enable texture stage 1
Texture[1] = <texEnv>;
MinFilter[1] = Linear;
MagFilter[1] = Linear;
MipFilter[1] = Linear;
ColorArg1[1] = Texture;
ColorArg2[1] = Current;
ColorOp[1] = Add;
AlphaOp[1] = disable;
TexCoordIndex[1] = CAMERASPACEREFLECTIONVECTOR;//SPHEREMAPCAMERASPACEPOSITION;
}
} |
|