RE: How to do this with fixed pipeline
From: Dege (Dege_at_discussions.microsoft.com)
Date: 10/01/04
- Previous message: Jack Hoxley: "Re: Newbie question..."
- In reply to: John Burton: "How to do this with fixed pipeline"
- Next in thread: Eyal Teler: "Re: How to do this with fixed pipeline"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 1 Oct 2004 01:39:05 -0700
Try using alpha testing: set the alpha of bright pink pixels to zero, then
set up the fixed pipeline to get the texure alpha. Then, enable alpha
testing, set alpha test reference value to 0, and alpha compare fnc to
D3D_CMP_GREATER or so. Alpha testing takes effect before alpha blending. In
this manner pink pixels should be omitted.
Dege
"John Burton" wrote:
> I have some existing bitmaps I need to use as textures.
> They have areas which are bright pink which are supposed to indicate that
> that area is transparent.
>
> I've not done it yet but it seems that this is easy to do with a pixel
> shader. Simply don't draw the pixel at all if it maps to a bright pink.
> That would work?
>
> But how could I do this with the fixed pipeline?
> I did some reading and found that the usualy way was to manipulate the alpha
> of the pixel to 0.0 for transparent pixels.
> But then in order to draw properly using a blend wouldn't I have to sort my
> triangles into Z order before drawing them, which I'd really rather not have
> to do as I can't imagine it would be at all speedy.
>
> Any suggestions? I'm really hoping there is a "dont draw 100% transparent
> pixels at all" function in the fixed pipeline, but after reading the D3D9
> help file from cover to cover I can't seem to find one.
>
>
>
- Previous message: Jack Hoxley: "Re: Newbie question..."
- In reply to: John Burton: "How to do this with fixed pipeline"
- Next in thread: Eyal Teler: "Re: How to do this with fixed pipeline"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|