游戏开发论坛

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

纹理阴影的问题

[复制链接]

18

主题

34

帖子

34

积分

注册会员

Rank: 2

积分
34
QQ
发表于 2010-6-23 16:39:00 | 显示全部楼层 |阅读模式
      场景里打开了个纹理阴影,发现树子在地上只有树干显示出阴影,而树枝却没有显示出阴影,树枝是用3个以60°两两相交的面(就像草的做法一样),贴得一个带透明通道的纹理,请问下这是怎么回事?

树枝的材质脚本如下:

material Material_#459470793/dzsp_shuye2
{
        technique
        {
                pass
                {
                        lighting off
                        scene_blend alpha_blend
                        alpha_rejection greater 0
                        depth_write off
                        cull_hardware none
                        cull_software none

                        texture_unit
                        {
                                texture_alias textureUnit_0
                                texture dzsp_shuye2.tga
                                max_anisotropy 20
                                filtering anisotropic anisotropic linear
                        }
                }

                pass
                {
                        lighting off
                        scene_blend alpha_blend
                        alpha_rejection greater 111
                        depth_write off
                        cull_hardware none
                        cull_software none

                        texture_unit
                        {
                                texture_alias textureUnit_0
                                texture dzsp_shuye2.tga
                                max_anisotropy 20
                                filtering anisotropic anisotropic linear
                        }
                }

        }
}

发现当设置depth_write 为on,地上会显示出树枝的阴影,但这时树枝会出现透明通道的问题!!!~汗,蛋疼中。。。
请问下有什么解决的办法没??
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-6-8 15:26

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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