OpenGL 玻璃 HUD?

发布于 2024-09-26 04:49:02 字数 382 浏览 0 评论 0原文

你好,我想知道如何制作看起来像“玻璃”的东西,例如皮克敏游戏中的例子。

它在 HUD 中,我想知道如何创建类似的东西。 我并不是想复制游戏,我只是喜欢它的外观。

它看起来像这样: http://3. bp.blogspot.com/_CWor6UdXxBk/SbaZDWSF6VI/AAAAAAAAFCU/UQgBvgGq-VE/s400/pikmin.jpg

其中有数字的矩形

我知道如何创建 HUD 但是我想知道如何动态生成背景矩形如示例中所示

Hello I Would like to know how to make somthing that looks like "Glass" the example would be in the game called Pikmin.

its in the HUD and i would like to know how to create somthing similar.
I Am not trying to copy the game i just like how it looks.

It looks like this: http://3.bp.blogspot.com/_CWor6UdXxBk/SbaZDWSF6VI/AAAAAAAAFCU/UQgBvgGq-VE/s400/pikmin.jpg

The rectangles that have numbers in them

I Know how to create an HUD However i would like to know how to dynamicly genorate the background rectangles like in the example

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

女中豪杰 2024-10-03 04:49:02

您应该研究 alpha 混合来绘制气泡。假设它们的反射是静态的,您所需要的只是一个简单的图像。 (如果您不确定图像应该是什么样子,请看一下游戏中的黑墙。您看到的白色部分应该是图像的红色、绿色、蓝色和 Alpha 通道的样子。)

数字是只是绘制在气泡顶部(或下方)的另一组 alpha 混合图像。上述内容也适用于他们。

You should look into alpha blending for drawing the bubbles. Assuming the reflections on them are static, all you need is a simple image. (If you aren't sure what the image should be like, look at a black wall in the game. The white parts you see should be what the red, green, blue AND alpha channels of the image look like.)

The numbers are just another set of alpha-blended images drawn on top (or below) the bubbles. The above goes for them too.

无声情话 2024-10-03 04:49:02

看起来它们只是带有 Alpha 混合的纹理。一个矩形,一个圆形,然后绘制并缩放为适合其中任何内容的多边形。

It looks like they're just textures with alpha blending. One rectangular, one circular and then drawn and scaled to a polygon that fits whatever goes in them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文