【问题标题】:XNA 4.0 : Unwanted texture blending depending on a color of backgroundXNA 4.0:不需要的纹理混合取决于背景颜色
【发布时间】:2013-01-21 23:24:53
【问题描述】:

我发现了在背景上绘制不透明前景纹理的问题。前景按钮纹理以某种方式与背景混合,您可以看到顶部按钮和最低按钮之间的差异。最低的按钮比顶部的按钮要轻一些。

button texture is depended on backgorund color

我在游戏创作中这样设置图形:

        // Set up graphics
        GraphicsDeviceManager graphics = new GraphicsDeviceManager(this);
        graphics.PreferredBackBufferWidth = 800;
        graphics.PreferredBackBufferHeight = 480;
        graphics.SynchronizeWithVerticalRetrace = true;

        // antialiasing
        graphics.PreferMultiSampling = true;
        graphics.ApplyChanges();

并在任何地方使用带有 Color.White 参数的空参数列表用于“spriteBatch.Begin();”没有任何混合的调用。

【问题讨论】:

    标签: c# xna


    【解决方案1】:

    颜色是一样的,只是看起来不一样:)

    在这里,我将图像的底部复制粘贴到顶部旁边:

    这是一种叫做simultaneous brightness contrast的视错觉。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-06
      • 2022-11-24
      • 1970-01-01
      • 2020-11-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多