游戏开发论坛

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

求助,关于XNA中透明混合公式的理解

[复制链接]

22

主题

49

帖子

49

积分

注册会员

Rank: 2

积分
49
发表于 2012-11-1 19:03:00 | 显示全部楼层 |阅读模式

透明混合的公式:(source * sourceBlendFactor) blendFunction (destination*destinationBlendFactor)

设置混合要素:
BlendState bs = new BlendState();
bs.ColorSourceBlend = Blend.One
bs.AlphaSourceBlend = Blend.One;
bs.ColorDestinationBlend = Blend.InverseSourceAlpha;
bs.AlphaDestinationBlend = Blend.InverseSourceAlpha;;
bs.AlphaBlendFunction = BlendFunction.Add;
bs.ColorBlendFunction = BlendFunction.Add;


请问一下代码中BlendState每个属性的设置是代表上述公式的哪个参数位置?
上述的公式我是理解,但是我觉得bs.ColorSourceBlend的值应该是Blend.SourceAlpha才对啊?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-2-27 13:25

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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