Jump to content


alpha testing with dx10


7 replies to this topic

#1 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2336 posts

Posted 29 April 2008 - 11:49 AM

Ive just got dx10 going for the first time.
Im stumped on one thing, there is no alpha testing anymore so I can
get the transparent parts not to draw to the render target, but I
cant stop it from writing the nothing pixels to the depth stencil.

Does someone know how?
Thanks.

#2 poita

    Senior Member

  • Members
  • PipPipPipPip
  • 322 posts

Posted 30 April 2008 - 01:52 AM

http://msdn.microsof...120(VS.85).aspx

#3 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2336 posts

Posted 30 April 2008 - 02:52 AM

Thanks, but ive already looked through it all. (especially the output merger section)

All they say is you do it with the pixel shader or the depth stencil and either way it doesnt look like its possible.

How is the pixel shader supposed to do it, all can do is pump out 0 alpha then the zbuffer writes anyway.

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 30 April 2008 - 04:39 AM

I guess you're supposed to use texkill in the pixel shader to discard fragments with alpha = 0.
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2336 posts

Posted 01 May 2008 - 04:11 AM

Oh, so the shader 4.0 has more abilities than the old one.
Ill go look up a tutorial on it. (but they are few and far between, last time I looked)

#6 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 01 May 2008 - 05:57 AM

texkill isn't a new feature in SM4.0, it's been around for awhile B)
reedbeta.com - developer blog, OpenGL demos, and other projects

#7 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2336 posts

Posted 01 May 2008 - 06:43 AM

Laugh if you will smarty. Ill go look it up then.

#8 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2336 posts

Posted 01 May 2008 - 06:58 AM

Thankyou. you go clip(-1) then the pixel is removed.
I guess I am a dumbass for not knowing that, but it is true that
the old way to clip doesnt work anymore from dx9 - so my post
actually does make sense.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users