Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are sixteen instances of three types of uniform.

Uniform NameType
scriptableInt<n>Signed 32-bit Integer
scriptableFloat<n>Signed 32-bit Single Precision Float
scriptableVec<n>Four-part Signed 32-bit Float Vector

In each variable name <n> is equal to a number 1 to 16 and corresponds to NwScript constants SHADER_UNIFORM_*

...

Code Block
//check if flag 2 is set
if ( GetIsFlagSet(scriptableInt1, MY_BITFLAG2) ){
	//do something here
}

//check if both flag 1 and 2 are set
if ( GetIsFlagSet(scriptableInt1, (MY_BITFLAG1 + MY_BITFLAG2)) ){
	//do something here
}

//check if either flag 1 or flag 2 is set
//check if both flag 1 and 2 are set
if ( GetIsFlagSet(scriptableInt1, MY_BITFLAG1) || GetIsFlagSet(scriptableInt1, MY_BITFLAG2)){
	//do something here
}

...