LiquidAsh

I'm having trouble with a simple tex2Dlod call from an effect in my XNA app. The function (and my displacement effect) work fine in nVidia's FX Composer, but tex2Dlod seems to be returning nothing but 0 in my XNA app. I can draw the texture onto the surface of my geometry in the same effect, so it seems to be loaded alright. Any ideas on what might be causing this difference will be greatfully received.

In case this helps: I'm working on a GeForce Go 6600. My card's caps say that it supports VertexTextures in R32F, and A32B32G32R32F formats, so I'm using the later. My texture is 256x256, and I'm using VS_3_0. All of my device settings are left to the defaults (which may be the problem ).

Thanks in advance, Ash.



Re: XNA Game Studio Express tex2Dlod not working from an XNA Windows Game?

LiquidAsh

I'm not sure whether this is related, but just in case:

It turns out that changing over to the Debug D3D Runtime (via the Control Panel), causes my DrawIndexedPrimitives call to throw an exception: "System.InvalidOperationException: The method call is invalid". It turns out that chaning this runtime also causes the FX Composer to fail its technique validation stage. This (in addition to the time I've spent combing through and simplifying my code) makes me believe that I should just leave the Control Panel setting at Retail. If this provides anyone with insite to the problem, please share :).

Best, Ash.





Re: XNA Game Studio Express tex2Dlod not working from an XNA Windows Game?

LiquidAsh

When texture resources are added to an XNA project, their default content processor is: Texture(Sprite,32bpp). This was overriding the 128bpp format of the file I was loading. Changing the content processor to Texture(mipmapped) seems to have solved this problem.