Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualmax343

Posted 05 November 2012 - 06:31 AM

The spec says that you cannot input to vs with interface block, and it makes perfect sense because vs reads the data from a buffer created by the api.
Same for fs, it outputs data to a buffer created by the api, hence no interface blocks.
Interface blocks connect only pipeline stages, with the only exception which is transform feedback (but the connection in this case is implicit).

Now that you matched all outputs to inputs it works. You could've also split the interface block into two blocks, and accomplish the same result.
Generally, using interface blocks is slightly better than just dumping all the variables into the global block, since it gives more structure to your code, but this is really your own choice.

#1max343

Posted 05 November 2012 - 06:29 AM

The spec says that you cannot input to vs with interface block, and it makes perfect sense because vs reads the data from a buffer created by the api.
Same for fs, it outputs data to a buffer created by the api, hence no interface blocks.
Interface blocks connect only pipeline stages, with the only exception which is transform feedback (but the connection in this case is implicit).

What you did is one way of accomplishing what you want. You could've also split the interface block into two blocks, and accomplish the same result.
Generally, using interface blocks is slightly better than just dumping all the variables into the global block, since it gives more structure to your code, but this is really your own choice.

PARTNERS