texkill and GeForce

Started by
4 comments, last by SHKiN 18 years, 9 months ago
Hi everybody! I'm doing alphatest on R16G16F via texkill: texld r0, t0, s0 ; load colormap sub r1, r0.a, c0.r ; c0.r contains alphaRef value mapped into [0..1] range texkill r1 ; kill pixel if its alpha is below alphaRef ... On all ATI's cards this works just fine, but on GeForceFX I see some strange and ugly picture - some tris are alphatested, but looks like texcoords are distorted, while others are completely opaque. Any help will be appreciated Thank you
Advertisement
How does it look using the reference rasterizer?

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

According to te DX docs, when sampling a D3DFMT_G16R16F texture with texld the A and B values are filled with default values of 1.0.
Robert DunlopThe X-Zonehttp://www.directxzone.org/Microsoft DirectX MVP-------------The opinions expressed in this message are my own personal views and do not reflect the official views of the Microsoft Corporation.The MVP program does not constitute employment or contractual obligation with Microsoft.
I'm not sure how loading an alpha value from a texture without an alpha channel in it is a good idea.

At a minimum, you have to check the spec to see what the correct behavior is supposed to be.

Even so, there are often driver bugs lurking in unusual uses of the api.

Hopefully that is just a typo.
Sorry guys, i've mean that R16G16F is a rendertarget, source texture has alpha, of course =)

I've found that texkill behaviour on FX is very strange. RHW vertices are OK, but with untransformed I receive distorted texcords.

Same thing on REF =(

Already tried about 10 detonators =(

BTW, DX8.1 ps.1.4 works fine
Finally I've got it!!!

def c1, 1, 1, 1, 1

...

mov r0.a, c1.r <==================== this line repairs everything!

mov oC0, r0

Thanks everybody for your replies!

This topic is closed to new replies.

Advertisement