Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Pixel Shader Errors

This topic is 5167 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to use pixel shaders to do some image processing. It keeps telling me that the POSITION is invalid. Any ideas? Where in general do people go for help interperating errors? float4 ps_main( float2 pos : POSITION ) : COLOR0 { return float4(sin(length(pos) * 100.0) * 0.5 + 0.5, sin(pos.y * 50.0), 0, 1); } technique windowlevel { pass p0 { PixelShader = compile ps_2_0 ps_main(); } } Thanks. InFerN0 Not all who wander are lost...

Share this post

Link to post
Share on other sites
While the PS2.0 needs to be fed the position register, it cannot actually use it as a source register - it just forwards it to the final pass (PS3 can sample the pos register, though).
What you could do, is to feed the position into a texture coordinate register from the vertex shader, as even the most basic PS has no trouble readíng the coords from the input.


EDIT: In general, when such error occurs, I refer to the SDK

[edited by - Nik02 on May 26, 2004 3:58:12 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!