1 Replies - 2590 Views - Last Post: 12 August 2017 - 11:51 PM

#1 basteagui  Icon User is offline

  • D.I.C Head

Reputation: 14
  • View blog
  • Posts: 60
  • Joined: 08-September 13

stencil + postprocess?

Posted 12 August 2017 - 08:40 AM

in XNA i am trying to use stencil shadows and also have a bloom effect sort of thing.

but i am finding out i can't render any stencil shadows on a rendertarget or the stencil buffer is lost,
from what i have been able to gather, this limitation (a very asinine limitation at that) exists because the XBOX
could not do this years ago.

is there a solution to this??

i would appreciate any ideas
Is This A Good Question/Topic? 0
  • +

Replies To: stencil + postprocess?

#2 basteagui  Icon User is offline

  • D.I.C Head

Reputation: 14
  • View blog
  • Posts: 60
  • Joined: 08-September 13

Re: stencil + postprocess?

Posted 12 August 2017 - 11:51 PM

alright i solved it.

you have to draw the rendertarget, but instead of calling NULLtarget and drawing, you have to set an empty render target before null, save the stenciltarget to a texture, and then render it.


why? because calling setrendertarget(null) will clear the buffers. so you should call it after you saved your stenciltarget into a texture.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1