Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Render-to-Surface ignoring separate alpha blending?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
No replies to this topic

#1 Khatharr   Members   

8637
Like
0Likes
Like

Posted 12 June 2012 - 05:46 PM

For font rendering I render my text to a texture surface and then just use the texture to display the text. I'd like to be able to render onto a surface without needing to clear the surface first, so that the rendered text is drawn on top of the existing texels.

In order to do this I:

-Start RTS
-Render the text to the surface
-End RTS

But I notice that this causes low-alpha texels around the edges of the rendered text, which is not good. So I try this:

-Create new texture with the dimensions of the existing one
-Start RTS
-Clear it
-Render the text to it
-End RTS
-Start RTS on the original texture surface
-Draw the new surface on top of it
-End RTS
-Dispose of the 'temporary' surface

But I'm still getting the same problem.

I checked my render states and I have separate alpha blending enabled. The op is ADD and the src/dest are the src/dest alpha, but the problem remains.

D3DPMISCCAPS_SEPARATEALPHABLEND is true.

So all I can think of is that maybe RTS ignores separate alpha blending?

Has anyone else run into this kind of thing?

Thanks in advance for any advice. :)
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.