XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

unexpected token 'break' in effect.

Last post 12/20/2008 10:00 PM by Hazy. 3 replies.
  • 12/20/2008 7:09 PM

    unexpected token 'break' in effect.

    Hi,

    I'm using a dynamic pixel shader loop and I'm trying to exit out of it early with a "break" statement as per the Nov 2008 SDK docs, but the statement is not recognized and I have yet to find an example to see where I'm going wrong.

    Any tips here?
  • 12/20/2008 8:24 PM In reply to

    Re: unexpected token 'break' in effect.

    It's possible this only became supported in a more recent shader model level, perhaps 3.0? Have you tried compiling the relevant shader as vs/ps 3.0?
  • 12/20/2008 8:37 PM In reply to

    Re: unexpected token 'break' in effect.

    XNA uses an old fx compiler and that command may not be supported in it.  If that is the case, you'll have to compile the effect with FXC from the latest SKD and load it through the effect constructor.
    Best,
    Byron
    ..shaders make you feel... powerful, or very very stupid.
    http://drjbn.spaces.live.com/
  • 12/20/2008 10:00 PM In reply to

    Re: unexpected token 'break' in effect.

    ajmiles:
    It's possible this only became supported in a more recent shader model level, perhaps 3.0? Have you tried compiling the relevant shader as vs/ps 3.0?


    No worries, it's being compiled under 3.0.






    Byron Nelson:
    XNA uses an old fx compiler and that command may not be supported in it.  If that is the case, you'll have to compile the effect with FXC from the latest SKD and load it through the effect constructor.
    Best,
    Byron


    It would have been handy but I just re-wrote the loop with an exit flag instead.

    Thanks, guys.
Page 1 of 1 (4 items) Previous Next