Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualHodgman

Posted 15 January 2013 - 09:42 PM

From shader-model 3.0 an onwards, you can't just use a vertex-shader by itself, it always needs to be paired with a pixel shader.

In your case, where you're not supplying your own pixel shader (and using shader-model 2.0), you're asking the driver to automatically write one for you and I wouldn't trust it to do the right thing, especially when it comes to advanced features like floating-point render targets.

 

Anyway, as Dancin_Fool said, the issue is that you're trying to pass your floating-point value through a colour register. As this page says: "Color registers ... have lower precision than most registers, guaranteed to have 8 bits of unsigned data in the range (0, +1)."

 

You should be using a tex-coord register to pass your floating point value to the pixel shader.


#1Hodgman

Posted 15 January 2013 - 09:40 PM

From shader-model 3.0 an onwards, you can't just use a vertex-shader by itself, it always needs to be paired with a pixel shader.

In your case, where you're not supplying your own pixel shader, you're asking the driver to automatically write one for you and I wouldn't trust it to do the right thing, especially when it comes to advanced features floating-point render targets.

 

Anyway, as Dancin_Fool said, the issue is that you're trying to pass your floating-point value through a colour register. As this page says: "Color registers ... have lower precision than most registers, guaranteed to have 8 bits of unsigned data in the range (0, +1)."


PARTNERS