|
|
前面的顶点代码略....
struct PS_OUTPUT
{
float4 oRGB : COLOR;
};
PS_OUTPUT skxPsMain(VS_OUTPUT input)
{
PS_OUTPUT output = (PS_OUTPUT)0;
output.oRGB = tex2D(MeshTextureSampler, input.oTex) * input.oDif * input.oSpe;
return output;
}
technique skxShader
{
pass P0
{
VertexShader = compile vs_1_1 skxVsMain();
PixelShader = compile ps_1_1 skxPsMain();
}
}
微软的例子没有这句
this->pd3dDevice->SetTexture(...)
微软的例子有这句
this->pd3dxEffect->SetTexture(...)
但是我的去掉第一句不显示纹理了
而微软的例子没有第一句照样显示出纹理,我的渲染代码都是抄过来的,差别为什么这么大????
为什么啊? |
|