..._var

..._flt

If the name of a floating point shader variable, array, or vector name ends with the character sequence "_var" or "_flt", it is automatically pre-set from a corresponding global variable, array, or struct defined in lite-C with the name preceding the "_var" resp. "_flt" character sequence. This way, a shader can use any global variable from the script.  LC 

Type:

var or float (lite-C)
float, floatn, floatnxn (shader code)

Remarks:

Example (lite-C):

var PSSM_Splits[4];
float fMyMatrix[16] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 };
... for (i=0; i<4; i++) { PSSM_Splits[i] = (i+1)*split_distance;
... MATERIAL* mtlPSSM = { effect = " float4x4 fMyMatrix_flt; // access the global fMyMatrix array float PSSM_Splits_var[4]; // access the global PSSM_Splits array ... for (int i=0; i<4; i++) {
if (fDist < PSSM_Splits_var[i]) { ... //compare shadowmap depth
... "; }

See also:

MATERIAL, shaders, shader parameters, ..._bmap

► latest version online