mojoshader.h
changeset 1106 2bef26cc20f9
parent 1104 9147482e1ec7
child 1112 ef76d5efedcc
equal deleted inserted replaced
1105:57e255c3b243 1106:2bef26cc20f9
   713  * You can force the shader to expect samplers of certain types. Generally
   713  * You can force the shader to expect samplers of certain types. Generally
   714  *  you don't need this, as Shader Model 2 and later always specify what they
   714  *  you don't need this, as Shader Model 2 and later always specify what they
   715  *  expect samplers to be (2D, cubemap, etc). Shader Model 1, however, just
   715  *  expect samplers to be (2D, cubemap, etc). Shader Model 1, however, just
   716  *  uses whatever is bound to a given sampler at draw time, but this doesn't
   716  *  uses whatever is bound to a given sampler at draw time, but this doesn't
   717  *  work in OpenGL, etc. In these cases, MojoShader will default to
   717  *  work in OpenGL, etc. In these cases, MojoShader will default to
   718  *  2D texture sampling, which works 75% of the time, but if you really
   718  *  2D texture sampling (or cubemap sampling, in cases where it makes sense,
   719  *  needed something else, you'll need to specify it here. This can also be
   719  *  like the TEXM3X3TEX opcode), which works 75% of the time, but if you
   720  *  used, at your own risk, to override DCL opcodes in shaders: if the
   720  *  really needed something else, you'll need to specify it here. This can
   721  *  shader explicit says 2D, but you want Cubemap, for example, you can use
   721  *  also be used, at your own risk, to override DCL opcodes in shaders: if
   722  *  this to override. If you aren't sure about any of this stuff, you can
   722  *  the shader explicit says 2D, but you want Cubemap, for example, you can
   723  *  almost certainly ignore it: (smap) can be NULL.
   723  *  use this to override. If you aren't sure about any of this stuff, you can
       
   724  *  (and should) almost certainly ignore it: (smap) can be NULL.
   724  *
   725  *
   725  * This function is thread safe, so long as (m) and (f) are too, and that
   726  * This function is thread safe, so long as (m) and (f) are too, and that
   726  *  (tokenbuf) remains intact for the duration of the call. This allows you
   727  *  (tokenbuf) remains intact for the duration of the call. This allows you
   727  *  to parse several shaders on separate CPU cores at the same time.
   728  *  to parse several shaders on separate CPU cores at the same time.
   728  */
   729  */