Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411275 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 05:56:19 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Monogame transparent RenderTargets not drawing correctly
Pages: [1]
Print
Author Topic: Monogame transparent RenderTargets not drawing correctly  (Read 1325 times)
Ben_Hurr
Level 10
*****


nom nom nom


View Profile
« on: April 23, 2017, 12:00:19 PM »

So to all of you Monogame devs; am I doing something wrong here?

Right now I'm trying to do something very simple; use the AlphaTestEffect shader to manually draw some color-keyed textures to a render target, then draw that render target to the backbuffer.

The drawing textures part works flawlessly, but when drawing the render target all of its transparent pixels show up as black.

-le frown-  Sad

Now I know AlphaTest does on/off transparency, but I don't know why it would behave that way with textures vs. RenderTargets? Anyone have any ideas?
Logged
cepnox
Level 0
***



View Profile
« Reply #1 on: April 26, 2017, 11:59:57 AM »

What surface format are you using when creating the render target?
Logged

Ben_Hurr
Level 10
*****


nom nom nom


View Profile
« Reply #2 on: April 30, 2017, 07:20:55 AM »

I actually fixed the problem since posting this lol.

The actual problem was that I wasn't taking into account the intentional (but FUCKING UNDOCUMENTED) behavior of Monogame when switching to a RenderTarget; which is to clear it to black by default.  Waaagh!
Logged
cepnox
Level 0
***



View Profile
« Reply #3 on: April 30, 2017, 01:22:48 PM »

Good to know Smiley
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic