alpha test broken on ati catalist 3.8 + ?

silenius

Newcomer
I am using shadow map in a project of mine (with pixel shader), and all was working fine until catalist 3.8. (D3D)

all work fine with the ref renderer. I waited few months hopping ati would correct the bug. but i finnaly gave up to wait for a fix and modify the shader I used to resimulate alphatest (using a texkill). Unfortunatly this make the shader 2 instruction bigger (a sub and a texkill), and my engine has currently a pixel shader Bottleneck.

my question is am I the only one who got problem using alphatest on a texture rendertarget? i tried a lot of thing but it really seems its broken. (even using never , always as alpha func has no effect on rendering th epixel is allways rendered)

thanks
 
Perhaps you should submit feedback to ATI via their Catalyst Feedback Report program or talk to someone in DevRel.
 
Well, I have to say, the reason why things aren't working is because you have failed to check if Post Pixel Shader blending is supported by the desired render target format.

Here's a hint, use IDirect3D9::CheckDeviceFormat() with the D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING usage flag to see if it will actually work.

Here's the info about that flag:

Query the resource to verify support for post pixel shader blending support. If IDirect3D9::CheckDeviceFormat fails with D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING, post pixel blending operations are not supported. These include alpha test, pixel fog, render-target blending, color write enable, and dithering.
 
silenius said:
good guess the problem was there, but this does,'t explain why they remove the functionnality

I'm guesing maybe its got something to do with the smart shader effects which were introduced at the time.
 
May I ask why you're using a 10 10 10 2 format? Wouldn't a 16-bit single channel format (i.e. D3DFMT_L16) be better? Less bandwidth and more precision. Or is this texture entirely unrelated to the depth map?
 
good question indeed

i use different channel to store differents informations

r=depth static , g=depth dynamic, b=frame counter, a=alpa

in fact the best for me would be a:

R12,G12,B7,A1 (but i guess it's a bit to specific :LOL: )

the R10G10B10A2 give very good result in both speed and quality
and i can store all i need in one texture (2048*2048 * 4 = 16 MB not so bad 1/8 of my video ram)

(thinking about using R16,G16,B16,A16 of new card but maybe too much)
but this would take 32MB 1/4 of my video ram a bit to much for a shadow map me think
 
I'm not certain, but my guess would be that it was a bug fix for WHQL. R3xx does support alpha test in 10/10/10/2 format, but not blending.

We may have (incorrectly) been supporting alpha test while saying in the caps that we didn't, which would be a WHQL failure.
 
The caps said you were supporting alpha blending. You'd get nice 'strange' colours when alpha blending. :)

Or at least, IIRC it said you supported blending. Regardless, it still produced strange colours. :)
 
I see. I guess there is no way to get alphatest without blending :)

I guess i gonna keep my new shader with texkill so

btw how to emulate alphatest with ps 1.1?
 
in next catalist drivers?

you work for ati?

if yes thanks.

I guess I gonna use this forum instead of ati bug repport this is much more efficient.
 
Back
Top