Problems with CubeMaps using HLSL Shaders

OK, so this is mostly a crazy check.

Below I have two images from two separate files that I was putting together using Ben Cloward’s CG Acadamy Shader Tutorial set.

I am wondering if there are any semi-documented “gothcas” regarding the implementation of these cube maps that I might want to know about…

I have been having the Devils time getting this to work, and eventually discovered that his sample fx file that was on the dvd wasn’t working properly either. (You can check the images below for what I mean by “not working”)

After some testing on my home machine, I decided that the issue was the texture not being set to CUBE. I like to use my own assets for testing whenever possible and my settings just seemed to be wrong… Thats how we learn.

I get back to the office and I realized that I did the test at home with the dvd assets. So another battery of tests… result… DVD Sample Shader coming out badly with DVD texture assets.

Secure in the knowledge that I had seen this thing working at least once, I started with more tests. After finding one fx file that was working I went through it line by line, comparing it with one that was not… no difference.

OK, so it is obviously the Texture. I set up several dds’s at varying settings… and got the results below. You will notice that with one file, the 8888 file is working while the 1555 is not. You will notice that with the other file, this is exactly reversed.

Can anyone give me any feedback on this phenomenon…? The fx files, while written separably, appear identical when I examined them line by line…

does anyone know what could be causing this…?
does anyone know how to get the metadata out of a dds without re saving it…? THAT would have sped this process up a lot too…
I am using an Nvidia Quadro FX 570. Does anyone know anything idiosyncratic about this particular card that might cause this…?

I have even tried to get a working shader out of ShaderFX as well… which worked perfectly… until I exported the tree out as an fx file, then the same issues began to manifest immediatly.

grrrrr…

Any input would be appreciated.

Thanks.
–cf

oh… and the files…

Relevant code would help in diagnosis. A common problem with going from FXComposer/ShaderFX examples to another renderer is row versus column major matrices. Are the matrix mul’s all the same? Are they in the form of mul( matrix, vector ) or mul( vector, matrix ) ? Are the reflect() calls both reflect(A,B) or is one reflect(B,A)? It really doesn’t sound like these should cause your first problem, but it might be the one when you tried to recreate it.