Google Grup tidak lagi mendukung postingan atau langganan Usenet baru. Konten lama masih dapat dilihat.

Render To Texture using alpha?

14 kali dilihat
Langsung ke pesan pertama yang belum dibaca

gameMaker

belum dibaca,
7 Jul 2005, 15.42.0307/07/05
kepada
Here is what I do:

First, I clear my destination texture surface to all zeros. Then, I render
a texture with alpha in the texture to this destination texture (A8R8B8G8).
Then, I put this destination texture onto a quad and clear the back buffer to
blue and render it to the back buffer (X8R8B8G8).

The problem is that the alpha in the texture appears darker than it should
be. If I do not render to texture but instead just render my quad to the
back buffer, the alpha looks correct.

Is there something I am not understanding about rendering to a texture and
preserving the alpha? Shouldn't the alpha stay exactly the same if I am
rendering it to an all black texture destination?

Thanks!

Wessam Bahnassi

belum dibaca,
8 Jul 2005, 00.51.2308/07/05
kepada
Revise the math for the color operation you want. You might notice that
you're blending the colors with alpha twice, which can darken them...

Wessam Bahnassi
Microsoft DirectX MVP,
Lead Programmer
In|Framez

"gameMaker" <game...@discussions.microsoft.com> wrote in message
news:C9AF079D-B662-4B91...@microsoft.com...

gameMaker

belum dibaca,
8 Jul 2005, 12.00.0508/07/05
kepada
Thanks Wessam, that did the trick! I thought blending with black would just
leave it as is, but now it makes sense.
0 pesan baru