PDA

View Full Version : alpha testing with dx10


rouncer
04-29-2008, 04: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.

poita
04-29-2008, 06:52 PM
http://msdn.microsoft.com/en-us/library/bb205120(VS.85).aspx

rouncer
04-29-2008, 07:52 PM
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.

Reedbeta
04-29-2008, 09:39 PM
I guess you're supposed to use texkill in the pixel shader to discard fragments with alpha = 0.

rouncer
04-30-2008, 09:11 PM
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)

Reedbeta
04-30-2008, 10:57 PM
texkill isn't a new feature in SM4.0, it's been around for awhile :D

rouncer
04-30-2008, 11:43 PM
Laugh if you will smarty. Ill go look it up then.

rouncer
04-30-2008, 11:58 PM
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.