添加剂勾兑[关于&QUOT问题;和"色调更换" [英] Question about "Additive blending" and "Hue replacement"

查看:122
本文介绍了添加剂勾兑[关于&QUOT问题;和"色调更换"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于绘图的字体是在CPU方面相当昂贵,
许多开发者使用光栅字体上绘制视频游戏的文字;这就是我确实做了。

Since drawing fonts is quite expensive in terms of CPU, many developers use a rasterized font to draw text on video games; that's what I did too.

使用添加剂调合而成绘制文本时就字型边缘做工精细,
这些很好地合并与背景颜色。

Using additive blending when drawing the text works fine regarding glyph edges, these merge nicely with the background color.

但它带来了另一个问题,

But it brought another issue,

我决定推行颜色参数绘制的字体,而不是生成字形每种颜色的位图,否则内存使用情况可能很快就会成为一个问题;这取决于有多少字形和颜色都需要,而且字体大小和,因为它支持Unicode,可以有成千上万的字形需要根据不同的语言。

I decided to implement a 'color' parameter for drawing the font, instead of producing glyphs bitmaps for each color, otherwise memory usage might be an issue soon; depending how many glyphs and colors are needed but also the font size and since it supports Unicode, there can be thousands of glyphs needed depending the language.

现在,说一个红色背景绿色环保的字体,它会'橙'!
哪个是添加剂调合而成的目的,而是试图绕过这个去多了几分复杂高于预期。显然,当背景是'黑',但它可能不是最终的颜色不会发生。

Now when I blend, say a 'Green' font on a 'Red' background, it goes 'Orange' ! Which is the purpose of additive blending, but trying to bypass this went a little more complicate than expected. Obviously it doesn't happen when background is 'Black' but it might not be that color in the end.

我怎样才能重新着色我的'白'字体'任何?'色彩,同时仍保留添加剂勾兑了任意颜色

How can I recolor my 'White' font to 'Any' color, while still retaining additive blending over 'Any' color ?

非常感谢:D

推荐答案

我有固定的,这里的答案!

这篇关于添加剂勾兑[关于&QUOT问题;和"色调更换"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆