PDA

View Full Version : :: Strange diff in behaviour..fx and ord pixel


vindos
27-Apr-2007, 04:57
Hi
I made a sample that uses an fx file. I pass a texture of type D3DFMT_L16 to fx file. I can retrive the texture data inside fx file for textures of size 256 X 256 but strangely its not working for size 512 X 512. I mean the texture doesnt show value when read from fx file.

Then i replaced fx file with an ordinary pixel shader. And i set a texture ( L16) using the constant table. Using this i can even set texture of size 1024 X 1024 and access the values properly.
Please someone tell me why this strange behaviour

JHoxley
27-Apr-2007, 12:58
Doesn't sound right to me - the effects framework is ultimately just a nice friendly layer on top of the core API.

First step is to run with debug runtimes - make sure you're not making an obvious mistake that it'll be screaming and shouting at you about...

Next, get real friendly with PIX. Real friendly :cool:

You can do a single frame capture of both methods and see where they differ - maybe the FX framework is doing something under the covers that it shouldn't be, or you're causing it to do something different etc...

If you can't find any differences there, dig into the pixel history features - see if the FX framework is generating the same shader code (very unlikely they'd differ, but check anyway) and see if the registers/samplers are configured appropriately.

hth
Jack