游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1183|回复: 0

为什么我的PixelShader不成功

[复制链接]

7

主题

12

帖子

12

积分

新手上路

Rank: 1

积分
12
QQ
发表于 2007-6-17 21:05:00 | 显示全部楼层 |阅读模式
前面的顶点代码略....

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(...)
但是我的去掉第一句不显示纹理了
而微软的例子没有第一句照样显示出纹理,我的渲染代码都是抄过来的,差别为什么这么大????
为什么啊?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-26 03:09

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表