Bad results

Hi!
When executing my pixel shader, results are ok. But when I execute with my recent new grpahic card Quadro FX 3400/4400 results are rubbish.
Exactly what happens is that!
In my pixel shader I have these four operations

Output.weights.x = (1-frac2.x)*(1-frac2.y);\n" // 1 float output
Output.weights.y = frac2.x*(1-frac2.y); // 1 float output
Output.weights.z = (1-frac2.x)*frac2.y; //1float output
Output.weights.w = frac2.x*frac2.y; // 1float output

Using Devyce_REF results are for example
0.5625
0.1875
0.1875
0.0625
that its exactly what i'm waiting for, but using my grpahic card the results are quite differents :
0.56175613
0.19117355
0.18433762
0.062732697

frac2.x and frac2.y are coming from pixel shader as

coord = In.oTex1 + (float2)transformation/texsize;
coord2[0] = coord*texsize;
frac2 = frac (coord2[0]);

and In.oTex1 is the output of my vertex shader as

Output.oTex1 = mul(vTex1, (float2x2)g_mWorld) + (float2)g_mWorld[3];
were in this case g_mWorld is the identity and g_mWorld[3] are (0.75 0.75)

My vertex coordinates are just a quand with values
(0,0)
(0,1)
(1,0)
(1,1)

The program works really fine with software emolution, but with the graphic card doesnt seems to work ok.

Can anyone give me a idea about whats going on
Thank you,

 




Answer this question

Bad results

  • TBurrowsNZ

    I am sure...all my buffer formats are A32R32G32b32F ... so, its not that the reason!! ... Could maybe the reference interpolated the texture coordinates different as hardware do


  • John W Powell

    Those look like decently close values - they are less than 2% wrong. Which says to me that it's using float16 or maybe even 8-bit arithmetic. Are you sure you are not converting to 16 or 8-bit arithmetic somewhere along the way - for example by using that format of framebuffer

  • Bad results