If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Transformers Human Alliance

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Transformers Human Alliance

Developers: Sega of China, Sega AM1
Publisher: Sega
Platform: Arcade (Sega RingEdge 2)
Released in JP: July 16, 2014[1]
Released in US: 2013
Released in UK: 2013


SourceIcon.png This game has uncompiled source code.
DevTextIcon.png This game has hidden development-related text.
GraphicsIcon.png This game has unused graphics.
MusicIcon.png This game has unused music.


Hmmm...
To do:
Data in BNK files for example:
  • Textures in acroarts_test.bnk.
MANY notes in Lua scripts.

Transformers Human Alliance is a rail shooter from Sega, taking place in the timeline of Michael Bay's Transformers film series with amazing graphics and cheesy voice acting.

Unused Graphics

acroarts_test.bnk

Two logos of a company named Acroarts.

Images of four unidentified cartoon characters. The jester, pigtailed female, and blonde female appear twice in the BNK file.

TransformersHumanAlliance-UnusedScreenshot1.png

A screenshot of possibly an early version of the game on a developer's computer. The level is a laboratory-type setting, and both players' crosshairs are visible. On the top right corner of the image, one can see debug text being printed.

TransformersHumanAlliance-UnusedScreenshot2.png

A second screenshot of likely the same game. This depicts the continue screen, which offers the player upgraded weapons (similar to Sega Golden Gun) including the Machinegun, Squad Missile, Stungun, and Nitro Engine. Beneath each weapon is a value indicating its level. Debug text is also present here.

comingsoon.bnk

Three textures from a "coming soon" teaser, which was likely leftover from a location test version of the game. Chinese and Japanese versions of these textures are also present in the data.

TransformersHumanAlliance-ToBeContinuedGraphic1.png TransformersHumanAlliance-ToBeContinuedGraphic2.png TransformersHumanAlliance-ToBeContinuedGraphic3.png

Unused Music

Some unused tracks are present in bgm.afs.

Filename Audio Notes
gameover.adx
The game over theme from Sega Golden Gun, another Sega light gun game made by Sega of China.
tf_bgm_test_01.adx
The first of three test music tracks. This was "Battle" by Steve Jablonsky from Transformers: Dark of the Moon.
tf_bgm_test_02.adx
A second test music track, featuring the song "Get Thru This" by Art of Dying from Transformers: Dark of the Moon.
tf_bgm_test_03.adx
The last test track has "The Shard" by Steve Jablonsky from Transformers: Revenge of the Fallen.

Debugging Functions

There's values for GameIsDebugMode and GameIsJenkinsTest. The first would allow debug logging, the other would multiply the player's speed by 2.5x and also set bullet damage from the player to 2500.

Failsafe

If a Lua script is loaded incorrectly, or is not present, the user will be loaded into an area with no enemies.

Failsafe when lua scripts fail to load/are not present.

Developer Leftovers

Compilation Directories

C:\Documents and Settings\chengqin\Desktop\TFG_D_U_StA_CQ_*\pictures\
C:\Documents and Settings\chengqin\Desktop\TFG_D_U_MJ_*_?\pictures\
C:\Documents and Settings\chengqin.SOC\Desktop\TFG_D_U_StA_MJ_?\pictures\
C:\Documents and Settings\gengjie\Desktop\
C:\Program Files (x86)\Acroarts
C:\Documents and Settings\zhanghongmei\Desktop\
C:\Documents and Settings\zhanghongmei\Desktop\texture
./DESIGN/BANK_*/model_tex/
E:\
E:\RingEdge2_TF_Gun\
d:\TF_Gun\TF_Gun\trunk
D:\Program Files\
D:\TF-GUN\CSE\TFG_D_U_StA_MJ_*\pictures\
D:\Transformers\texiao\smoke
Y:\Project\Project_Arcade\PJ_RingEdge2_TF_Gun\Art

Leftover metadata present in the game's assets and the executable's code. Replace "*" with the name of the bank file. Some developers really worked on this game on their desktop.

Uncompiled Shader Effects

The shader directory has two uncompiled effect files, not used by the game.

PostEffect.fx

#ifndef __POSTEFFECT_FX__
#define __POSTEFFECT_FX__


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PostEffect default
struct VS_POST_EFFECT_INPUT
{
	float4  Position    : POSITION;    
    float2  TexCoord0   : TEXCOORD0;
};

struct VS_POST_EFFECT_OUTPUT
{
    float4  Position    : POSITION;     
    float2  TexCoord0   : TEXCOORD0;    
};

void	PostEffectDefaultVS( VS_POST_EFFECT_INPUT _input, out VS_POST_EFFECT_OUTPUT _output )
{
	_output.Position = _input.Position;
    _output.TexCoord0 = _input.TexCoord0;
}

//#define POST_EFFECT_DEFAULT_VS()										\
//	VS_POST_EFFECT_OUTPUT output = (VS_POST_EFFECT_OUTPUT)0;			\
//	PostEffectDefaultVS( _input, output );								\
//	return output;



/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GaussianBlur H & V
uniform float WIDTH;
uniform float HEIGHT;
uniform float WIDTH8;
uniform float HEIGHT8;
uniform float GaussFactor[8];

static const int g_GaussFactorSize = 8;

half4 CalcGaussianBlurH(sampler2D Sampler, float2 TexCoord, float2 TexOffsetScale)
{
	half4 OutColor = 0.0f;

    for (int i = 0; i < g_KernelSize; i++)
    {    
        OutColor += tex2D( Sampler, TexCoord + g_HTexelKernel[i] * TexOffsetScale ) * g_BlurWeights[i];
    }
    
    return OutColor;
}

half4 CalcGaussianBlurV(sampler2D Sampler, float2 TexCoord, float2 TexOffsetScale)
{
	half4 OutColor = 0.0f;

    for (int i = 0; i < g_KernelSize; i++)
    {    
        OutColor += tex2D( Sampler, TexCoord + g_VTexelKernel[i] * TexOffsetScale ) * g_BlurWeights[i];
    }
    
    return OutColor;
}

half4 CalcGaussianBlurScaleH(sampler2D Sampler, float2 TexCoord, float2 TexOffsetScale, float Scale)
{
	half4 OutColor = 0.0f;

    for (int i = 0; i < g_KernelSize; i++)
    {    
        OutColor += tex2D( Sampler, TexCoord + g_HTexelKernel[i] * TexOffsetScale ) * g_BlurWeights[i];
    }
    
    OutColor *= Scale;
    
    return OutColor;
}

half4 CalcGaussianBlurScaleV(sampler2D Sampler, float2 TexCoord, float2 TexOffsetScale, float Scale)
{
	half4 OutColor = 0.0f;

    for (int i = 0; i < g_KernelSize; i++)
    {    
        OutColor += tex2D( Sampler, TexCoord + g_VTexelKernel[i] * TexOffsetScale ) * g_BlurWeights[i];
    }
    
    OutColor *= Scale;
    
    return OutColor;
}


// 如果使用如下两个函数,需要在CPU中计算GaussFactor,可以参考如下代码
// *** 该公式最好的地方在于它有Width参数,可以根据其计算出不同的权重,并且也减少了Pixel的计算量 ***
//		// GlareWidth = 5.0f; GlarePower = 1.0f;
//		if ( GlareWidth > 0.0001f )
//		{
//			for ( i = 0; i < 8; ++i )
//			{
//				float x = i+0.5f;
//				GaussianFactor[ i ]=expf( -( x * x ) / ( ( 2 * GlareWidth * GlareWidth ) ) );
//			}
//		
//			// 计算GaussFactor的和作为归一化的除数
//			float sum = 0.0f;
//			for ( i = 0; i < 8; ++i )
//			{
//				sum += GaussianFactor[ i ];
//			}
//			if ( sum > 0 )
//			{
//				// 虽然是8个循环,但Shader里面其实是8个上下,共16次采样,所以还要除2。
//				float k = GlarePower / sum / 2.0f; 
//				for ( i = 0; i < 8; ++i )
//				{
//					GaussianFactor[ i ] *= k;
//				}
//			}
//			else
//			{
//				for ( i = 0; i < 8; ++i )
//					GaussianFactor[ i ] = 0.0f;
//			}
//		}


half4 CalcGaussianBlurH( sampler2D _Sampler, float2 _TexCoord )
{
	half4 OutColor = 0.0f;

    for (int i = 0; i < g_GaussFactorSize; ++i )
    {    
		float2 TexCoord = _TexCoord + float2( ( i + 0.5f ) * WIDTH, 0.0f );

		OutColor = OutColor + tex2D( _Sampler, TexCoord ) * GaussFactor[ i ] 
					+ tex2D( _Sampler, TexCoord - float2( WIDTH8, 0.0f ) ) * GaussFactor[ 7 - i ];
    }
    
    return OutColor;
}

half4 CalcGaussianBlurV( sampler2D _Sampler, float2 _TexCoord )
{
	half4 OutColor = 0.0f;

	for ( int i = 0; i < g_GaussFactorSize; ++i )
	{
		float2 TexCoord = _TexCoord + float2( 0.0f, ( i + 0.5f ) * HEIGHT );

		OutColor = OutColor + tex2D( _Sampler, TexCoord ) * GaussFactor[ i ] 
					+ tex2D( _Sampler, TexCoord - float2( 0.0f, HEIGHT8 ) ) * GaussFactor[ 7 - i];
	}

    return OutColor;
}



/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Down filter 2x2
half4 CalcFilter2x2( sampler2D Sampler, float2 TexCoord, float2 TexOffsetScale)
{
	half4 OutColor = 0.0f;
    
	for(int i = 0; i < 4; i++)
	{
		OutColor.rgba += tex2D( Sampler, TexCoord + g_TexelOffset2x2[i] * TexOffsetScale );
	}
	OutColor /= 4.0f;

    return OutColor;
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Down filter 4x4
half4 CalcFilter4x4( sampler2D Sampler, float2 TexCoord, float2 TexOffsetScale )
{
	half4 OutColor = 0.0h;

	for ( int i = 0; i < 16; i++ )
	{
		OutColor += tex2D( Sampler, TexCoord + g_TexelOffset4x4[ i ] * TexOffsetScale );
	}
	OutColor /= 16.0h;

	return OutColor;
}

#endif

TexelOffset.fx:

#ifndef __TEXELOFFSET_FX__
#define __TEXELOFFSET_FX__

//********************************************
// Filter 2x2
//********************************************
static const float2 g_TexelOffset2x2[ 4 ] = {
	{ -0.5, -0.5 },
	{  0.5,	-0.5 },
	{ -0.5,  0.5 },
	{  0.5,	 0.5 },
};

//********************************************
// Filter 4x4
//********************************************
static const float2 g_TexelOffset4x4[ 16 ] = {
	{ -1.5f,  1.5f },
	{ -0.5f,  1.5f },
	{  0.5f,  1.5f },
	{  1.5f,  1.5f },
	
	{ -1.5f,  0.5f },
	{ -0.5f,  0.5f },
	{  0.5f,  0.5f },
	{  1.5f,  0.5f },
	
	{ -1.5f, -0.5f },
	{ -0.5f, -0.5f },
	{  0.5f, -0.5f },
	{  1.5f, -0.5f },
	
	{ -1.5f, -1.5f },
	{ -0.5f, -1.5f },
	{  0.5f, -1.5f },
	{  1.5f, -1.5f }
};

//********************************************
// Filter 8x8
//********************************************
static const float2 g_TexelOffset8x8[ 64 ] = {
	{ -3.500000f,	-3.500000f },
	{ -3.500000f,	-2.500000f },
	{ -3.500000f,	-1.500000f },
	{ -3.500000f,	-0.500000f },
	{ -3.500000f,	0.500000f },
	{ -3.500000f,	1.500000f },
	{ -3.500000f,	2.500000f },
	{ -3.500000f,	3.500000f },
	{ -2.500000f,	-3.500000f },
	{ -2.500000f,	-2.500000f },
	{ -2.500000f,	-1.500000f },
	{ -2.500000f,	-0.500000f },
	{ -2.500000f,	0.500000f },
	{ -2.500000f,	1.500000f },
	{ -2.500000f,	2.500000f },
	{ -2.500000f,	3.500000f },
	{ -1.500000f,	-3.500000f },
	{ -1.500000f,	-2.500000f },
	{ -1.500000f,	-1.500000f },
	{ -1.500000f,	-0.500000f },
	{ -1.500000f,	0.500000f },
	{ -1.500000f,	1.500000f },
	{ -1.500000f,	2.500000f },
	{ -1.500000f,	3.500000f },
	{ -0.500000f,	-3.500000f },
	{ -0.500000f,	-2.500000f },
	{ -0.500000f,	-1.500000f },
	{ -0.500000f,	-0.500000f },
	{ -0.500000f,	0.500000f },
	{ -0.500000f,	1.500000f },
	{ -0.500000f,	2.500000f },
	{ -0.500000f,	3.500000f },
	{ 0.500000f,	-3.500000f },
	{ 0.500000f,	-2.500000f },
	{ 0.500000f,	-1.500000f },
	{ 0.500000f,	-0.500000f },
	{ 0.500000f,	0.500000f },
	{ 0.500000f,	1.500000f },
	{ 0.500000f,	2.500000f },
	{ 0.500000f,	3.500000f },
	{ 1.500000f,	-3.500000f },
	{ 1.500000f,	-2.500000f },
	{ 1.500000f,	-1.500000f },
	{ 1.500000f,	-0.500000f },
	{ 1.500000f,	0.500000f },
	{ 1.500000f,	1.500000f },
	{ 1.500000f,	2.500000f },
	{ 1.500000f,	3.500000f },
	{ 2.500000f,	-3.500000f },
	{ 2.500000f,	-2.500000f },
	{ 2.500000f,	-1.500000f },
	{ 2.500000f,	-0.500000f },
	{ 2.500000f,	0.500000f },
	{ 2.500000f,	1.500000f },
	{ 2.500000f,	2.500000f },
	{ 2.500000f,	3.500000f },
	{ 3.500000f,	-3.500000f },
	{ 3.500000f,	-2.500000f },
	{ 3.500000f,	-1.500000f },
	{ 3.500000f,	-0.500000f },
	{ 3.500000f,	0.500000f },
	{ 3.500000f,	1.500000f },
	{ 3.500000f,	2.500000f },
	{ 3.500000f,	3.500000f },
};



/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GaussianBlur H & V
static const int g_KernelSize = 13;

static float2 g_HTexelKernel[g_KernelSize] =
{
    { -6, 0 },
    { -5, 0 },
    { -4, 0 },
    { -3, 0 },
    { -2, 0 },
    { -1, 0 },
    {  0, 0 },
    {  1, 0 },
    {  2, 0 },
    {  3, 0 },
    {  4, 0 },
    {  5, 0 },
    {  6, 0 },
};

static float2 g_VTexelKernel[g_KernelSize] =
{
    { 0, -6 },
    { 0, -5 },
    { 0, -4 },
    { 0, -3 },
    { 0, -2 },
    { 0, -1 },
    { 0,  0 },
    { 0,  1 },
    { 0,  2 },
    { 0,  3 },
    { 0,  4 },
    { 0,  5 },
    { 0,  6 },
};

static const float g_BlurWeights[g_KernelSize] = 
{
    0.002216,
    0.008764,
    0.026995,
    0.064759,
    0.120985,
    0.176033,
    0.199471,
    0.176033,
    0.120985,
    0.064759,
    0.026995,
    0.008764,
    0.002216,
};

#endif

Source Headers

The same directory has two source files from Sega's NN Library.

nnduv_def.h:


#ifndef __NNDUV_DEF_H__
#define __NNDUV_DEF_H__

#define NND_UV_NUM					0

#if ( NND_OPT_TEX_NORMAL != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_NORMAL 0
		#define NND_UV_SUFFIX_NORMAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_NORMAL 0
		#define NND_UV_SUFFIX_NORMAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_NORMAL 1
		#define NND_UV_SUFFIX_NORMAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_NORMAL 1
		#define NND_UV_SUFFIX_NORMAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_NORMAL 2
		#define NND_UV_SUFFIX_NORMAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_NORMAL 2
		#define NND_UV_SUFFIX_NORMAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_NORMAL 3
		#define NND_UV_SUFFIX_NORMAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_NORMAL 3
		#define NND_UV_SUFFIX_NORMAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_NORMAL 4
		#define NND_UV_SUFFIX_NORMAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_NORMAL 4
		#define NND_UV_SUFFIX_NORMAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_NORMAL 5
		#define NND_UV_SUFFIX_NORMAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_NORMAL 5 
		#define NND_UV_SUFFIX_NORMAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_NORMAL 6 
		#define NND_UV_SUFFIX_NORMAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_NORMAL 6
		#define NND_UV_SUFFIX_NORMAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_NORMAL 7
		#define NND_UV_SUFFIX_NORMAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_NORMAL 7
		#define NND_UV_SUFFIX_NORMAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_NORMAL overflow
	#endif
#endif

#if ( NND_OPT_TEX_BASE != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_BASE 0
		#define NND_UV_SUFFIX_BASE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_BASE 0
		#define NND_UV_SUFFIX_BASE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_BASE 1
		#define NND_UV_SUFFIX_BASE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_BASE 1
		#define NND_UV_SUFFIX_BASE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_BASE 2
		#define NND_UV_SUFFIX_BASE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_BASE 2
		#define NND_UV_SUFFIX_BASE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_BASE 3
		#define NND_UV_SUFFIX_BASE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_BASE 3
		#define NND_UV_SUFFIX_BASE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_BASE 4
		#define NND_UV_SUFFIX_BASE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_BASE 4
		#define NND_UV_SUFFIX_BASE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_BASE 5
		#define NND_UV_SUFFIX_BASE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_BASE 5 
		#define NND_UV_SUFFIX_BASE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_BASE 6 
		#define NND_UV_SUFFIX_BASE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_BASE 6
		#define NND_UV_SUFFIX_BASE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_BASE 7
		#define NND_UV_SUFFIX_BASE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_BASE 7
		#define NND_UV_SUFFIX_BASE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_BASE overflow
	#endif
#endif

#if ( NND_OPT_TEX_DECAL != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_DECAL 0
		#define NND_UV_SUFFIX_DECAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_DECAL 0
		#define NND_UV_SUFFIX_DECAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_DECAL 1
		#define NND_UV_SUFFIX_DECAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_DECAL 1
		#define NND_UV_SUFFIX_DECAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_DECAL 2
		#define NND_UV_SUFFIX_DECAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_DECAL 2
		#define NND_UV_SUFFIX_DECAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_DECAL 3
		#define NND_UV_SUFFIX_DECAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_DECAL 3
		#define NND_UV_SUFFIX_DECAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_DECAL 4
		#define NND_UV_SUFFIX_DECAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_DECAL 4
		#define NND_UV_SUFFIX_DECAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_DECAL 5
		#define NND_UV_SUFFIX_DECAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_DECAL 5 
		#define NND_UV_SUFFIX_DECAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_DECAL 6 
		#define NND_UV_SUFFIX_DECAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_DECAL 6
		#define NND_UV_SUFFIX_DECAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_DECAL 7
		#define NND_UV_SUFFIX_DECAL			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_DECAL 7
		#define NND_UV_SUFFIX_DECAL			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_DECAL overflow
	#endif
#endif

#if ( NND_OPT_TEX_DECAL2 != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_DECAL2 0
		#define NND_UV_SUFFIX_DECAL2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_DECAL2 0
		#define NND_UV_SUFFIX_DECAL2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_DECAL2 1
		#define NND_UV_SUFFIX_DECAL2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_DECAL2 1
		#define NND_UV_SUFFIX_DECAL2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_DECAL2 2
		#define NND_UV_SUFFIX_DECAL2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_DECAL2 2
		#define NND_UV_SUFFIX_DECAL2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_DECAL2 3
		#define NND_UV_SUFFIX_DECAL2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_DECAL2 3
		#define NND_UV_SUFFIX_DECAL2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_DECAL2 4
		#define NND_UV_SUFFIX_DECAL2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_DECAL2 4
		#define NND_UV_SUFFIX_DECAL2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_DECAL2 5
		#define NND_UV_SUFFIX_DECAL2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_DECAL2 5 
		#define NND_UV_SUFFIX_DECAL2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_DECAL2 6 
		#define NND_UV_SUFFIX_DECAL2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_DECAL2 6
		#define NND_UV_SUFFIX_DECAL2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_DECAL2 7
		#define NND_UV_SUFFIX_DECAL2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_DECAL2 7
		#define NND_UV_SUFFIX_DECAL2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_DECAL2 overflow
	#endif
#endif

#if ( NND_OPT_TEX_DECAL3 != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_DECAL3 0
		#define NND_UV_SUFFIX_DECAL3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_DECAL3 0
		#define NND_UV_SUFFIX_DECAL3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_DECAL3 1
		#define NND_UV_SUFFIX_DECAL3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_DECAL3 1
		#define NND_UV_SUFFIX_DECAL3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_DECAL3 2
		#define NND_UV_SUFFIX_DECAL3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_DECAL3 2
		#define NND_UV_SUFFIX_DECAL3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_DECAL3 3
		#define NND_UV_SUFFIX_DECAL3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_DECAL3 3
		#define NND_UV_SUFFIX_DECAL3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_DECAL3 4
		#define NND_UV_SUFFIX_DECAL3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_DECAL3 4
		#define NND_UV_SUFFIX_DECAL3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_DECAL3 5
		#define NND_UV_SUFFIX_DECAL3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_DECAL3 5 
		#define NND_UV_SUFFIX_DECAL3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_DECAL3 6 
		#define NND_UV_SUFFIX_DECAL3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_DECAL3 6
		#define NND_UV_SUFFIX_DECAL3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_DECAL3 7
		#define NND_UV_SUFFIX_DECAL3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_DECAL3 7
		#define NND_UV_SUFFIX_DECAL3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_DECAL3 overflow
	#endif
#endif

#if ( NND_OPT_TEX_SPECULAR != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_SPECULAR 0
		#define NND_UV_SUFFIX_SPECULAR			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_SPECULAR 0
		#define NND_UV_SUFFIX_SPECULAR			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_SPECULAR 1
		#define NND_UV_SUFFIX_SPECULAR			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_SPECULAR 1
		#define NND_UV_SUFFIX_SPECULAR			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_SPECULAR 2
		#define NND_UV_SUFFIX_SPECULAR			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_SPECULAR 2
		#define NND_UV_SUFFIX_SPECULAR			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_SPECULAR 3
		#define NND_UV_SUFFIX_SPECULAR			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_SPECULAR 3
		#define NND_UV_SUFFIX_SPECULAR			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_SPECULAR 4
		#define NND_UV_SUFFIX_SPECULAR			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_SPECULAR 4
		#define NND_UV_SUFFIX_SPECULAR			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_SPECULAR 5
		#define NND_UV_SUFFIX_SPECULAR			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_SPECULAR 5 
		#define NND_UV_SUFFIX_SPECULAR			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_SPECULAR 6 
		#define NND_UV_SUFFIX_SPECULAR			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_SPECULAR 6
		#define NND_UV_SUFFIX_SPECULAR			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_SPECULAR 7
		#define NND_UV_SUFFIX_SPECULAR			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_SPECULAR 7
		#define NND_UV_SUFFIX_SPECULAR			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_SPECULAR overflow
	#endif
#endif

#if ( NND_OPT_TEX_SHININESS != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_SHININESS 0
		#define NND_UV_SUFFIX_SHININESS			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_SHININESS 0
		#define NND_UV_SUFFIX_SHININESS			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_SHININESS 1
		#define NND_UV_SUFFIX_SHININESS			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_SHININESS 1
		#define NND_UV_SUFFIX_SHININESS			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_SHININESS 2
		#define NND_UV_SUFFIX_SHININESS			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_SHININESS 2
		#define NND_UV_SUFFIX_SHININESS			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_SHININESS 3
		#define NND_UV_SUFFIX_SHININESS			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_SHININESS 3
		#define NND_UV_SUFFIX_SHININESS			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_SHININESS 4
		#define NND_UV_SUFFIX_SHININESS			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_SHININESS 4
		#define NND_UV_SUFFIX_SHININESS			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_SHININESS 5
		#define NND_UV_SUFFIX_SHININESS			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_SHININESS 5 
		#define NND_UV_SUFFIX_SHININESS			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_SHININESS 6 
		#define NND_UV_SUFFIX_SHININESS			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_SHININESS 6
		#define NND_UV_SUFFIX_SHININESS			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_SHININESS 7
		#define NND_UV_SUFFIX_SHININESS			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_SHININESS 7
		#define NND_UV_SUFFIX_SHININESS			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_SHININESS overflow
	#endif
#endif

#if 0 // 2008.06.23(必要ない(yanso))
#if ( NND_OPT_TEX_DUALPARABOLOID	!= -1 && NND_OPT_TEXCOORD_DUALPARABOLOID	!= -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_DUALPARABOLOID 0
		#define NND_UV_SUFFIX_DUALPARABOLOID			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_DUALPARABOLOID 0
		#define NND_UV_SUFFIX_DUALPARABOLOID			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_DUALPARABOLOID 1
		#define NND_UV_SUFFIX_DUALPARABOLOID			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_DUALPARABOLOID 1
		#define NND_UV_SUFFIX_DUALPARABOLOID			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_DUALPARABOLOID 2
		#define NND_UV_SUFFIX_DUALPARABOLOID			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_DUALPARABOLOID 2
		#define NND_UV_SUFFIX_DUALPARABOLOID			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_DUALPARABOLOID 3
		#define NND_UV_SUFFIX_DUALPARABOLOID			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_DUALPARABOLOID 3
		#define NND_UV_SUFFIX_DUALPARABOLOID			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_DUALPARABOLOID 4
		#define NND_UV_SUFFIX_DUALPARABOLOID			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_DUALPARABOLOID 4
		#define NND_UV_SUFFIX_DUALPARABOLOID			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_DUALPARABOLOID 5
		#define NND_UV_SUFFIX_DUALPARABOLOID			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_DUALPARABOLOID 5 
		#define NND_UV_SUFFIX_DUALPARABOLOID			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_DUALPARABOLOID 6 
		#define NND_UV_SUFFIX_DUALPARABOLOID			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_DUALPARABOLOID 6
		#define NND_UV_SUFFIX_DUALPARABOLOID			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_DUALPARABOLOID 7
		#define NND_UV_SUFFIX_DUALPARABOLOID			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_DUALPARABOLOID 7
		#define NND_UV_SUFFIX_DUALPARABOLOID			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_DUALPARABOLOID overflow
	#endif
#endif
#endif

#if ( NND_OPT_TEX_ENVMASK != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_ENVMASK 0
		#define NND_UV_SUFFIX_ENVMASK			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_ENVMASK 0
		#define NND_UV_SUFFIX_ENVMASK			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_ENVMASK 1
		#define NND_UV_SUFFIX_ENVMASK			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_ENVMASK 1
		#define NND_UV_SUFFIX_ENVMASK			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_ENVMASK 2
		#define NND_UV_SUFFIX_ENVMASK			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_ENVMASK 2
		#define NND_UV_SUFFIX_ENVMASK			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_ENVMASK 3
		#define NND_UV_SUFFIX_ENVMASK			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_ENVMASK 3
		#define NND_UV_SUFFIX_ENVMASK			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_ENVMASK 4
		#define NND_UV_SUFFIX_ENVMASK			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_ENVMASK 4
		#define NND_UV_SUFFIX_ENVMASK			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_ENVMASK 5
		#define NND_UV_SUFFIX_ENVMASK			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_ENVMASK 5 
		#define NND_UV_SUFFIX_ENVMASK			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_ENVMASK 6 
		#define NND_UV_SUFFIX_ENVMASK			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_ENVMASK 6
		#define NND_UV_SUFFIX_ENVMASK			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_ENVMASK 7
		#define NND_UV_SUFFIX_ENVMASK			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_ENVMASK 7
		#define NND_UV_SUFFIX_ENVMASK			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_ENVMASK overflow
	#endif
#endif

#if ( NND_OPT_TEX_MODULATE != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_MODULATE 0
		#define NND_UV_SUFFIX_MODULATE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_MODULATE 0
		#define NND_UV_SUFFIX_MODULATE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_MODULATE 1
		#define NND_UV_SUFFIX_MODULATE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_MODULATE 1
		#define NND_UV_SUFFIX_MODULATE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_MODULATE 2
		#define NND_UV_SUFFIX_MODULATE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_MODULATE 2
		#define NND_UV_SUFFIX_MODULATE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_MODULATE 3
		#define NND_UV_SUFFIX_MODULATE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_MODULATE 3
		#define NND_UV_SUFFIX_MODULATE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_MODULATE 4
		#define NND_UV_SUFFIX_MODULATE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_MODULATE 4
		#define NND_UV_SUFFIX_MODULATE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_MODULATE 5
		#define NND_UV_SUFFIX_MODULATE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_MODULATE 5 
		#define NND_UV_SUFFIX_MODULATE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_MODULATE 6 
		#define NND_UV_SUFFIX_MODULATE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_MODULATE 6
		#define NND_UV_SUFFIX_MODULATE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_MODULATE 7
		#define NND_UV_SUFFIX_MODULATE			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_MODULATE 7
		#define NND_UV_SUFFIX_MODULATE			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_MODULATE overflow
	#endif
#endif

#if ( NND_OPT_TEX_ADD != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_ADD 0
		#define NND_UV_SUFFIX_ADD			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_ADD 0
		#define NND_UV_SUFFIX_ADD			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_ADD 1
		#define NND_UV_SUFFIX_ADD			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_ADD 1
		#define NND_UV_SUFFIX_ADD			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_ADD 2
		#define NND_UV_SUFFIX_ADD			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_ADD 2
		#define NND_UV_SUFFIX_ADD			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_ADD 3
		#define NND_UV_SUFFIX_ADD			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_ADD 3
		#define NND_UV_SUFFIX_ADD			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_ADD 4
		#define NND_UV_SUFFIX_ADD			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_ADD 4
		#define NND_UV_SUFFIX_ADD			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_ADD 5
		#define NND_UV_SUFFIX_ADD			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_ADD 5 
		#define NND_UV_SUFFIX_ADD			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_ADD 6 
		#define NND_UV_SUFFIX_ADD			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_ADD 6
		#define NND_UV_SUFFIX_ADD			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_ADD 7
		#define NND_UV_SUFFIX_ADD			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_ADD 7
		#define NND_UV_SUFFIX_ADD			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_ADD overflow
	#endif
#endif

#if ( NND_OPT_TEX_OPACITY != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_OPACITY 0
		#define NND_UV_SUFFIX_OPACITY			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_OPACITY 0
		#define NND_UV_SUFFIX_OPACITY			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_OPACITY 1
		#define NND_UV_SUFFIX_OPACITY			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_OPACITY 1
		#define NND_UV_SUFFIX_OPACITY			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_OPACITY 2
		#define NND_UV_SUFFIX_OPACITY			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_OPACITY 2
		#define NND_UV_SUFFIX_OPACITY			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_OPACITY 3
		#define NND_UV_SUFFIX_OPACITY			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_OPACITY 3
		#define NND_UV_SUFFIX_OPACITY			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_OPACITY 4
		#define NND_UV_SUFFIX_OPACITY			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_OPACITY 4
		#define NND_UV_SUFFIX_OPACITY			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_OPACITY 5
		#define NND_UV_SUFFIX_OPACITY			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_OPACITY 5 
		#define NND_UV_SUFFIX_OPACITY			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_OPACITY 6 
		#define NND_UV_SUFFIX_OPACITY			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_OPACITY 6
		#define NND_UV_SUFFIX_OPACITY			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_OPACITY 7
		#define NND_UV_SUFFIX_OPACITY			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_OPACITY 7
		#define NND_UV_SUFFIX_OPACITY			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_OPACITY overflow
	#endif
#endif

#if ( NND_OPT_TEX_USER1 != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_USER1 0
		#define NND_UV_SUFFIX_USER1			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_USER1 0
		#define NND_UV_SUFFIX_USER1			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_USER1 1
		#define NND_UV_SUFFIX_USER1			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_USER1 1
		#define NND_UV_SUFFIX_USER1			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_USER1 2
		#define NND_UV_SUFFIX_USER1			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_USER1 2
		#define NND_UV_SUFFIX_USER1			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_USER1 3
		#define NND_UV_SUFFIX_USER1			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_USER1 3
		#define NND_UV_SUFFIX_USER1			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_USER1 4
		#define NND_UV_SUFFIX_USER1			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_USER1 4
		#define NND_UV_SUFFIX_USER1			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_USER1 5
		#define NND_UV_SUFFIX_USER1			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_USER1 5 
		#define NND_UV_SUFFIX_USER1			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_USER1 6 
		#define NND_UV_SUFFIX_USER1			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_USER1 6
		#define NND_UV_SUFFIX_USER1			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_USER1 7
		#define NND_UV_SUFFIX_USER1			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_USER1 7
		#define NND_UV_SUFFIX_USER1			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_USER1 overflow
	#endif
#endif

#if ( NND_OPT_TEX_USER2 != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_USER2 0
		#define NND_UV_SUFFIX_USER2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_USER2 0
		#define NND_UV_SUFFIX_USER2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_USER2 1
		#define NND_UV_SUFFIX_USER2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_USER2 1
		#define NND_UV_SUFFIX_USER2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_USER2 2
		#define NND_UV_SUFFIX_USER2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_USER2 2
		#define NND_UV_SUFFIX_USER2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_USER2 3
		#define NND_UV_SUFFIX_USER2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_USER2 3
		#define NND_UV_SUFFIX_USER2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_USER2 4
		#define NND_UV_SUFFIX_USER2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_USER2 4
		#define NND_UV_SUFFIX_USER2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_USER2 5
		#define NND_UV_SUFFIX_USER2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_USER2 5 
		#define NND_UV_SUFFIX_USER2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_USER2 6 
		#define NND_UV_SUFFIX_USER2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_USER2 6
		#define NND_UV_SUFFIX_USER2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_USER2 7
		#define NND_UV_SUFFIX_USER2			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_USER2 7
		#define NND_UV_SUFFIX_USER2			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_USER2 overflow
	#endif
#endif

#if ( NND_OPT_TEX_USER3 != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_USER3 0
		#define NND_UV_SUFFIX_USER3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_USER3 0
		#define NND_UV_SUFFIX_USER3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_USER3 1
		#define NND_UV_SUFFIX_USER3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_USER3 1
		#define NND_UV_SUFFIX_USER3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_USER3 2
		#define NND_UV_SUFFIX_USER3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_USER3 2
		#define NND_UV_SUFFIX_USER3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_USER3 3
		#define NND_UV_SUFFIX_USER3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_USER3 3
		#define NND_UV_SUFFIX_USER3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_USER3 4
		#define NND_UV_SUFFIX_USER3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_USER3 4
		#define NND_UV_SUFFIX_USER3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_USER3 5
		#define NND_UV_SUFFIX_USER3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_USER3 5 
		#define NND_UV_SUFFIX_USER3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_USER3 6 
		#define NND_UV_SUFFIX_USER3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_USER3 6
		#define NND_UV_SUFFIX_USER3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_USER3 7
		#define NND_UV_SUFFIX_USER3			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_USER3 7
		#define NND_UV_SUFFIX_USER3			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_USER3 overflow
	#endif
#endif

#if ( NND_OPT_TEX_USER4 != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_USER4 0
		#define NND_UV_SUFFIX_USER4			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_USER4 0
		#define NND_UV_SUFFIX_USER4			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_USER4 1
		#define NND_UV_SUFFIX_USER4			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_USER4 1
		#define NND_UV_SUFFIX_USER4			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_USER4 2
		#define NND_UV_SUFFIX_USER4			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_USER4 2
		#define NND_UV_SUFFIX_USER4			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_USER4 3
		#define NND_UV_SUFFIX_USER4			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_USER4 3
		#define NND_UV_SUFFIX_USER4			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_USER4 4
		#define NND_UV_SUFFIX_USER4			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_USER4 4
		#define NND_UV_SUFFIX_USER4			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_USER4 5
		#define NND_UV_SUFFIX_USER4			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_USER4 5 
		#define NND_UV_SUFFIX_USER4			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_USER4 6 
		#define NND_UV_SUFFIX_USER4			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_USER4 6
		#define NND_UV_SUFFIX_USER4			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_USER4 7
		#define NND_UV_SUFFIX_USER4			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_USER4 7
		#define NND_UV_SUFFIX_USER4			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_USER4 overflow
	#endif
#endif

#if ( NND_OPT_TEX_USER5 != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_USER5 0
		#define NND_UV_SUFFIX_USER5			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_USER5 0
		#define NND_UV_SUFFIX_USER5			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_USER5 1
		#define NND_UV_SUFFIX_USER5			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_USER5 1
		#define NND_UV_SUFFIX_USER5			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_USER5 2
		#define NND_UV_SUFFIX_USER5			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_USER5 2
		#define NND_UV_SUFFIX_USER5			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_USER5 3
		#define NND_UV_SUFFIX_USER5			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_USER5 3
		#define NND_UV_SUFFIX_USER5			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_USER5 4
		#define NND_UV_SUFFIX_USER5			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_USER5 4
		#define NND_UV_SUFFIX_USER5			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_USER5 5
		#define NND_UV_SUFFIX_USER5			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_USER5 5 
		#define NND_UV_SUFFIX_USER5			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_USER5 6 
		#define NND_UV_SUFFIX_USER5			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_USER5 6
		#define NND_UV_SUFFIX_USER5			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_USER5 7
		#define NND_UV_SUFFIX_USER5			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_USER5 7
		#define NND_UV_SUFFIX_USER5			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_USER5 overflow
	#endif
#endif

#if ( NND_OPT_TEX_USER6 != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_USER6 0
		#define NND_UV_SUFFIX_USER6			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_USER6 0
		#define NND_UV_SUFFIX_USER6			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_USER6 1
		#define NND_UV_SUFFIX_USER6			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_USER6 1
		#define NND_UV_SUFFIX_USER6			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_USER6 2
		#define NND_UV_SUFFIX_USER6			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_USER6 2
		#define NND_UV_SUFFIX_USER6			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_USER6 3
		#define NND_UV_SUFFIX_USER6			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_USER6 3
		#define NND_UV_SUFFIX_USER6			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_USER6 4
		#define NND_UV_SUFFIX_USER6			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_USER6 4
		#define NND_UV_SUFFIX_USER6			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_USER6 5
		#define NND_UV_SUFFIX_USER6			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_USER6 5 
		#define NND_UV_SUFFIX_USER6			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_USER6 6 
		#define NND_UV_SUFFIX_USER6			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_USER6 6
		#define NND_UV_SUFFIX_USER6			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_USER6 7
		#define NND_UV_SUFFIX_USER6			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_USER6 7
		#define NND_UV_SUFFIX_USER6			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_USER6 overflow
	#endif
#endif

#if ( NND_OPT_TEX_USER7 != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_USER7 0
		#define NND_UV_SUFFIX_USER7			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_USER7 0
		#define NND_UV_SUFFIX_USER7			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_USER7 1
		#define NND_UV_SUFFIX_USER7			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_USER7 1
		#define NND_UV_SUFFIX_USER7			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_USER7 2
		#define NND_UV_SUFFIX_USER7			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_USER7 2
		#define NND_UV_SUFFIX_USER7			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_USER7 3
		#define NND_UV_SUFFIX_USER7			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_USER7 3
		#define NND_UV_SUFFIX_USER7			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_USER7 4
		#define NND_UV_SUFFIX_USER7			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_USER7 4
		#define NND_UV_SUFFIX_USER7			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_USER7 5
		#define NND_UV_SUFFIX_USER7			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_USER7 5 
		#define NND_UV_SUFFIX_USER7			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_USER7 6 
		#define NND_UV_SUFFIX_USER7			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_USER7 6
		#define NND_UV_SUFFIX_USER7			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_USER7 7
		#define NND_UV_SUFFIX_USER7			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_USER7 7
		#define NND_UV_SUFFIX_USER7			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_USER7 overflow
	#endif
#endif

#if ( NND_OPT_TEX_USER8 != -1 )
	#if   NND_UV_NUM == 0
		#define NND_UV_NO_USER8 0
		#define NND_UV_SUFFIX_USER8			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 1
	#elif NND_UV_NUM == 1
		#define NND_UV_NO_USER8 0
		#define NND_UV_SUFFIX_USER8			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 2
	#elif NND_UV_NUM == 2
		#define NND_UV_NO_USER8 1
		#define NND_UV_SUFFIX_USER8			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 3
	#elif NND_UV_NUM == 3
		#define NND_UV_NO_USER8 1
		#define NND_UV_SUFFIX_USER8			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 4
	#elif NND_UV_NUM == 4
		#define NND_UV_NO_USER8 2
		#define NND_UV_SUFFIX_USER8			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 5
	#elif NND_UV_NUM == 5
		#define NND_UV_NO_USER8 2
		#define NND_UV_SUFFIX_USER8			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 6
	#elif NND_UV_NUM == 6
		#define NND_UV_NO_USER8 3
		#define NND_UV_SUFFIX_USER8			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 7
	#elif NND_UV_NUM == 7
		#define NND_UV_NO_USER8 3
		#define NND_UV_SUFFIX_USER8			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 8
	#elif NND_UV_NUM == 8
		#define NND_UV_NO_USER8 4
		#define NND_UV_SUFFIX_USER8			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 9
	#elif NND_UV_NUM == 9
		#define NND_UV_NO_USER8 4
		#define NND_UV_SUFFIX_USER8			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 10
	#elif NND_UV_NUM == 10
		#define NND_UV_NO_USER8 5
		#define NND_UV_SUFFIX_USER8			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 11
	#elif NND_UV_NUM == 11
		#define NND_UV_NO_USER8 5 
		#define NND_UV_SUFFIX_USER8			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 12
	#elif NND_UV_NUM == 12
		#define NND_UV_NO_USER8 6 
		#define NND_UV_SUFFIX_USER8			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 13
	#elif NND_UV_NUM == 13
		#define NND_UV_NO_USER8 6
		#define NND_UV_SUFFIX_USER8			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 14
	#elif NND_UV_NUM == 14
		#define NND_UV_NO_USER8 7
		#define NND_UV_SUFFIX_USER8			xy
		#undef  NND_UV_NUM
		#define NND_UV_NUM 15
	#elif NND_UV_NUM == 15
		#define NND_UV_NO_USER8 7
		#define NND_UV_SUFFIX_USER8			zw
		#undef  NND_UV_NUM
		#define NND_UV_NUM 16
	#else
		#error NND_UV_NO_USER8 overflow
	#endif
#endif

#if (NND_UV_NUM/2) == ((NND_UV_NUM+1)/2)
#define NND_MAX_UV	(NND_UV_NUM/2)
#else
#define NND_MAX_UV	( (NND_UV_NUM/2) + 1 )
#endif

#endif // ifndef __NNDUV_DEF_H__

sampler_def.h:


#ifndef __SAMPLER_DEF_H__
#define __SAMPLER_DEF_H__

#define SAMPLER_TAIL 0

#if ( NND_OPT_TEX_NORMAL != -1 )
#define SAMPLER_NORMAL     s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#endif
#if ( NND_OPT_TEX_BASE != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_BASE       s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_BASE       s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#endif
#endif
#if ( NND_OPT_TEX_DECAL != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_DECAL      s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_DECAL      s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_DECAL      s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#endif
#endif
#if ( NND_OPT_TEX_DECAL2 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_DECAL2     s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_DECAL2     s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_DECAL2     s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_DECAL2     s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#endif
#endif
#if ( NND_OPT_TEX_DECAL3 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_DECAL3     s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_DECAL3     s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_DECAL3     s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_DECAL3     s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_DECAL3     s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#endif
#endif

#if ( NND_OPT_TEX_SPECULAR != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_SPECULAR  s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_SPECULAR  s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_SPECULAR  s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_SPECULAR  s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_SPECULAR  s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_SPECULAR  s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#endif
#endif
#if ( NND_OPT_TEX_SHININESS != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_SHININESS  s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_SHININESS  s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_SHININESS  s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_SHININESS  s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_SHININESS  s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_SHININESS  s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_SHININESS  s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#endif
#endif
#if ( NND_OPT_TEX_DUALPARABOLOID != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_DUALPARA   s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_DUALPARA   s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_DUALPARA   s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_DUALPARA   s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_DUALPARA   s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_DUALPARA   s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_DUALPARA   s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_DUALPARA   s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#endif
#endif
#if ( NND_OPT_TEX_ENVMASK != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_ENVMASK    s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_ENVMASK    s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_ENVMASK    s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_ENVMASK    s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_ENVMASK    s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_ENVMASK    s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_ENVMASK    s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_ENVMASK    s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_ENVMASK    s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#endif
#endif
#if ( NND_OPT_TEX_MODULATE != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_MODULATE   s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_MODULATE   s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_MODULATE   s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_MODULATE   s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_MODULATE   s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_MODULATE   s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_MODULATE   s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_MODULATE   s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_MODULATE   s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_MODULATE   s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#endif
#endif
#if ( NND_OPT_TEX_ADD != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_ADD        s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_ADD        s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_ADD        s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_ADD        s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_ADD        s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_ADD        s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_ADD        s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_ADD        s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_ADD        s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_ADD        s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_ADD        s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#endif
#endif

#if ( NND_OPT_TEX_OPACITY != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_OPACITY    s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_OPACITY    s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_OPACITY    s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_OPACITY    s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_OPACITY    s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_OPACITY    s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_OPACITY    s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_OPACITY    s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_OPACITY    s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_OPACITY    s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_OPACITY    s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_OPACITY    s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_OPACITY    s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#endif
#endif
#if ( NND_OPT_TEX_USER1 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_USER1      s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_USER1      s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_USER1      s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_USER1      s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_USER1      s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_USER1      s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_USER1      s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_USER1      s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_USER1      s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_USER1      s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_USER1      s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_USER1      s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_USER1      s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#elif SAMPLER_TAIL == 13
#define SAMPLER_USER1      s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       14
#elif SAMPLER_TAIL == 14
#define SAMPLER_USER1      s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       15
#endif
#endif
#if ( NND_OPT_TEX_USER2 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_USER2      s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_USER2      s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_USER2      s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_USER2      s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_USER2      s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_USER2      s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_USER2      s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_USER2      s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_USER2      s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_USER2      s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_USER2      s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_USER2      s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_USER2      s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#elif SAMPLER_TAIL == 13
#define SAMPLER_USER2      s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       14
#elif SAMPLER_TAIL == 14
#define SAMPLER_USER2      s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       15
#elif SAMPLER_TAIL == 15
#define SAMPLER_USER2      s15
#undef  SAMPLER_TAIL
#endif
#endif
#if ( NND_OPT_TEX_USER3 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_USER3      s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_USER3      s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_USER3      s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_USER3      s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_USER3      s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_USER3      s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_USER3      s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_USER3      s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_USER3      s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_USER3      s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_USER3      s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_USER3      s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_USER3      s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#elif SAMPLER_TAIL == 13
#define SAMPLER_USER3      s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       14
#elif SAMPLER_TAIL == 14
#define SAMPLER_USER3      s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       15
#elif SAMPLER_TAIL == 15
#define SAMPLER_USER3      s15
#undef  SAMPLER_TAIL
#endif
#endif
#if ( NND_OPT_TEX_USER4 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_USER4      s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_USER4      s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_USER4      s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_USER4      s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_USER4      s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_USER4      s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_USER4      s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_USER4      s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_USER4      s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_USER4      s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_USER4      s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_USER4      s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_USER4      s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#elif SAMPLER_TAIL == 13
#define SAMPLER_USER4      s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       14
#elif SAMPLER_TAIL == 14
#define SAMPLER_USER4      s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       15
#elif SAMPLER_TAIL == 15
#define SAMPLER_USER4      s15
#endif
#endif
#if ( NND_OPT_TEX_USER5 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_USER5      s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_USER5      s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_USER5      s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_USER5      s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_USER5      s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_USER5      s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_USER5      s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_USER5      s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_USER5      s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_USER5      s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_USER5      s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_USER5      s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_USER5      s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#elif SAMPLER_TAIL == 13
#define SAMPLER_USER5      s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       14
#elif SAMPLER_TAIL == 14
#define SAMPLER_USER5      s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       15
#elif SAMPLER_TAIL == 15
#define SAMPLER_USER5      s15
#endif
#endif
#if ( NND_OPT_TEX_USER6 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_USER6      s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_USER6      s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_USER6      s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_USER6      s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_USER6      s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_USER6      s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_USER6      s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_USER6      s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_USER6      s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_USER6      s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_USER6      s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_USER6      s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_USER6      s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#elif SAMPLER_TAIL == 13
#define SAMPLER_USER6      s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       14
#elif SAMPLER_TAIL == 14
#define SAMPLER_USER6      s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       15
#elif SAMPLER_TAIL == 15
#define SAMPLER_USER6      s15
#endif
#endif
#if ( NND_OPT_TEX_USER7 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_USER7      s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_USER7      s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_USER7      s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_USER7      s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_USER7      s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_USER7      s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_USER7      s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_USER7      s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_USER7      s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_USER7      s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_USER7      s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_USER7      s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_USER7      s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#elif SAMPLER_TAIL == 13
#define SAMPLER_USER7      s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       14
#elif SAMPLER_TAIL == 14
#define SAMPLER_USER7      s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       15
#elif SAMPLER_TAIL == 15
#define SAMPLER_USER7      s15
#endif
#endif
#if ( NND_OPT_TEX_USER8 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_USER8      s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_USER8      s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_USER8      s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_USER8      s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_USER8      s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_USER8      s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_USER8      s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_USER8      s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_USER8      s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_USER8      s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_USER8      s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_USER8      s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_USER8      s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#elif SAMPLER_TAIL == 13
#define SAMPLER_USER8      s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       14
#elif SAMPLER_TAIL == 14
#define SAMPLER_USER8      s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       15
#elif SAMPLER_TAIL == 15
#define SAMPLER_USER8      s15
#endif
#endif
#if ( NND_OPT_TEX_SHADOW != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_SHADOW     s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_SHADOW     s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_SHADOW     s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_SHADOW     s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_SHADOW     s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_SHADOW     s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_SHADOW     s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_SHADOW     s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_SHADOW     s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_SHADOW     s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_SHADOW     s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_SHADOW     s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_SHADOW     s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#elif SAMPLER_TAIL == 13
#define SAMPLER_SHADOW     s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       14
#elif SAMPLER_TAIL == 14
#define SAMPLER_SHADOW     s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       15
#elif SAMPLER_TAIL == 15
#define SAMPLER_SHADOW     s15
#endif
#endif
#if ( NND_OPT_TEX_SHADOW2 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_SHADOW2    s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       1
#elif SAMPLER_TAIL == 1
#define SAMPLER_SHADOW2    s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       2
#elif SAMPLER_TAIL == 2
#define SAMPLER_SHADOW2    s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       3
#elif SAMPLER_TAIL == 3
#define SAMPLER_SHADOW2    s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       4
#elif SAMPLER_TAIL == 4
#define SAMPLER_SHADOW2    s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       5
#elif SAMPLER_TAIL == 5
#define SAMPLER_SHADOW2    s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       6
#elif SAMPLER_TAIL == 6
#define SAMPLER_SHADOW2    s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       7
#elif SAMPLER_TAIL == 7
#define SAMPLER_SHADOW2    s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       8
#elif SAMPLER_TAIL == 8
#define SAMPLER_SHADOW2    s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       9
#elif SAMPLER_TAIL == 9
#define SAMPLER_SHADOW2    s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       10
#elif SAMPLER_TAIL == 10
#define SAMPLER_SHADOW2    s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       11
#elif SAMPLER_TAIL == 11
#define SAMPLER_SHADOW2    s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       12
#elif SAMPLER_TAIL == 12
#define SAMPLER_SHADOW2    s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       13
#elif SAMPLER_TAIL == 13
#define SAMPLER_SHADOW2    s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       14
#elif SAMPLER_TAIL == 14
#define SAMPLER_SHADOW2    s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL       15
#elif SAMPLER_TAIL == 15
#define SAMPLER_SHADOW2    s15
#endif
#endif

#if ( NND_OPT_TEX_SAMPLER2D1 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_SAMPLER2D1   s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         1
#elif SAMPLER_TAIL == 1
#define SAMPLER_SAMPLER2D1   s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         2
#elif SAMPLER_TAIL == 2
#define SAMPLER_SAMPLER2D1   s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         3
#elif SAMPLER_TAIL == 3
#define SAMPLER_SAMPLER2D1   s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         4
#elif SAMPLER_TAIL == 4
#define SAMPLER_SAMPLER2D1   s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         5
#elif SAMPLER_TAIL == 5
#define SAMPLER_SAMPLER2D1   s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         6
#elif SAMPLER_TAIL == 6
#define SAMPLER_SAMPLER2D1   s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         7
#elif SAMPLER_TAIL == 7
#define SAMPLER_SAMPLER2D1   s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         8
#elif SAMPLER_TAIL == 8
#define SAMPLER_SAMPLER2D1   s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         9
#elif SAMPLER_TAIL == 9
#define SAMPLER_SAMPLER2D1   s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         10
#elif SAMPLER_TAIL == 10
#define SAMPLER_SAMPLER2D1   s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         11
#elif SAMPLER_TAIL == 11
#define SAMPLER_SAMPLER2D1   s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         12
#elif SAMPLER_TAIL == 12
#define SAMPLER_SAMPLER2D1   s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         13
#elif SAMPLER_TAIL == 13
#define SAMPLER_SAMPLER2D1   s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         14
#elif SAMPLER_TAIL == 14
#define SAMPLER_SAMPLER2D1   s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         15
#elif SAMPLER_TAIL == 15
#define SAMPLER_SAMPLER2D1   s15
#endif
#endif

#if ( NND_OPT_TEX_SAMPLER2D2 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_SAMPLER2D2   s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         1
#elif SAMPLER_TAIL == 1
#define SAMPLER_SAMPLER2D2   s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         2
#elif SAMPLER_TAIL == 2
#define SAMPLER_SAMPLER2D2   s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         3
#elif SAMPLER_TAIL == 3
#define SAMPLER_SAMPLER2D2   s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         4
#elif SAMPLER_TAIL == 4
#define SAMPLER_SAMPLER2D2   s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         5
#elif SAMPLER_TAIL == 5
#define SAMPLER_SAMPLER2D2   s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         6
#elif SAMPLER_TAIL == 6
#define SAMPLER_SAMPLER2D2   s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         7
#elif SAMPLER_TAIL == 7
#define SAMPLER_SAMPLER2D2   s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         8
#elif SAMPLER_TAIL == 8
#define SAMPLER_SAMPLER2D2   s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         9
#elif SAMPLER_TAIL == 9
#define SAMPLER_SAMPLER2D2   s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         10
#elif SAMPLER_TAIL == 10
#define SAMPLER_SAMPLER2D2   s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         11
#elif SAMPLER_TAIL == 11
#define SAMPLER_SAMPLER2D2   s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         12
#elif SAMPLER_TAIL == 12
#define SAMPLER_SAMPLER2D2   s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         13
#elif SAMPLER_TAIL == 13
#define SAMPLER_SAMPLER2D2   s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         14
#elif SAMPLER_TAIL == 14
#define SAMPLER_SAMPLER2D2   s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         15
#elif SAMPLER_TAIL == 15
#define SAMPLER_SAMPLER2D2   s15
#endif
#endif

#if ( NND_OPT_TEX_SAMPLER3D1 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_SAMPLER3D1   s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         1
#elif SAMPLER_TAIL == 1
#define SAMPLER_SAMPLER3D1   s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         2
#elif SAMPLER_TAIL == 2
#define SAMPLER_SAMPLER3D1   s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         3
#elif SAMPLER_TAIL == 3
#define SAMPLER_SAMPLER3D1   s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         4
#elif SAMPLER_TAIL == 4
#define SAMPLER_SAMPLER3D1   s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         5
#elif SAMPLER_TAIL == 5
#define SAMPLER_SAMPLER3D1   s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         6
#elif SAMPLER_TAIL == 6
#define SAMPLER_SAMPLER3D1   s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         7
#elif SAMPLER_TAIL == 7
#define SAMPLER_SAMPLER3D1   s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         8
#elif SAMPLER_TAIL == 8
#define SAMPLER_SAMPLER3D1   s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         9
#elif SAMPLER_TAIL == 9
#define SAMPLER_SAMPLER3D1   s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         10
#elif SAMPLER_TAIL == 10
#define SAMPLER_SAMPLER3D1   s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         11
#elif SAMPLER_TAIL == 11
#define SAMPLER_SAMPLER3D1   s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         12
#elif SAMPLER_TAIL == 12
#define SAMPLER_SAMPLER3D1   s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         13
#elif SAMPLER_TAIL == 13
#define SAMPLER_SAMPLER3D1   s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         14
#elif SAMPLER_TAIL == 14
#define SAMPLER_SAMPLER3D1   s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         15
#elif SAMPLER_TAIL == 15
#define SAMPLER_SAMPLER3D1   s15
#endif
#endif

#if ( NND_OPT_TEX_SAMPLER3D2 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_SAMPLER3D2   s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         1
#elif SAMPLER_TAIL == 1
#define SAMPLER_SAMPLER3D2   s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         2
#elif SAMPLER_TAIL == 2
#define SAMPLER_SAMPLER3D2   s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         3
#elif SAMPLER_TAIL == 3
#define SAMPLER_SAMPLER3D2   s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         4
#elif SAMPLER_TAIL == 4
#define SAMPLER_SAMPLER3D2   s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         5
#elif SAMPLER_TAIL == 5
#define SAMPLER_SAMPLER3D2   s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         6
#elif SAMPLER_TAIL == 6
#define SAMPLER_SAMPLER3D2   s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         7
#elif SAMPLER_TAIL == 7
#define SAMPLER_SAMPLER3D2   s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         8
#elif SAMPLER_TAIL == 8
#define SAMPLER_SAMPLER3D2   s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         9
#elif SAMPLER_TAIL == 9
#define SAMPLER_SAMPLER3D2   s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         10
#elif SAMPLER_TAIL == 10
#define SAMPLER_SAMPLER3D2   s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         11
#elif SAMPLER_TAIL == 11
#define SAMPLER_SAMPLER3D2   s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         12
#elif SAMPLER_TAIL == 12
#define SAMPLER_SAMPLER3D2   s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         13
#elif SAMPLER_TAIL == 13
#define SAMPLER_SAMPLER3D2   s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         14
#elif SAMPLER_TAIL == 14
#define SAMPLER_SAMPLER3D2   s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         15
#elif SAMPLER_TAIL == 15
#define SAMPLER_SAMPLER3D2   s15
#endif
#endif

#if ( NND_OPT_TEX_SAMPLERCUBE1 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_SAMPLERCUBE1 s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         1
#elif SAMPLER_TAIL == 1
#define SAMPLER_SAMPLERCUBE1 s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         2
#elif SAMPLER_TAIL == 2
#define SAMPLER_SAMPLERCUBE1 s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         3
#elif SAMPLER_TAIL == 3
#define SAMPLER_SAMPLERCUBE1 s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         4
#elif SAMPLER_TAIL == 4
#define SAMPLER_SAMPLERCUBE1 s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         5
#elif SAMPLER_TAIL == 5
#define SAMPLER_SAMPLERCUBE1 s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         6
#elif SAMPLER_TAIL == 6
#define SAMPLER_SAMPLERCUBE1 s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         7
#elif SAMPLER_TAIL == 7
#define SAMPLER_SAMPLERCUBE1 s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         8
#elif SAMPLER_TAIL == 8
#define SAMPLER_SAMPLERCUBE1 s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         9
#elif SAMPLER_TAIL == 9
#define SAMPLER_SAMPLERCUBE1 s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         10
#elif SAMPLER_TAIL == 10
#define SAMPLER_SAMPLERCUBE1 s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         11
#elif SAMPLER_TAIL == 11
#define SAMPLER_SAMPLERCUBE1 s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         12
#elif SAMPLER_TAIL == 12
#define SAMPLER_SAMPLERCUBE1 s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         13
#elif SAMPLER_TAIL == 13
#define SAMPLER_SAMPLERCUBE1 s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         14
#elif SAMPLER_TAIL == 14
#define SAMPLER_SAMPLERCUBE1 s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         15
#elif SAMPLER_TAIL == 15
#define SAMPLER_SAMPLERCUBE1 s15
#endif
#endif

#if ( NND_OPT_TEX_SAMPLERCUBE2 != -1 )
#if   SAMPLER_TAIL == 0
#define SAMPLER_SAMPLERCUBE2 s0
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         1
#elif SAMPLER_TAIL == 1
#define SAMPLER_SAMPLERCUBE2 s1
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         2
#elif SAMPLER_TAIL == 2
#define SAMPLER_SAMPLERCUBE2 s2
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         3
#elif SAMPLER_TAIL == 3
#define SAMPLER_SAMPLERCUBE2 s3
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         4
#elif SAMPLER_TAIL == 4
#define SAMPLER_SAMPLERCUBE2 s4
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         5
#elif SAMPLER_TAIL == 5
#define SAMPLER_SAMPLERCUBE2 s5
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         6
#elif SAMPLER_TAIL == 6
#define SAMPLER_SAMPLERCUBE2 s6
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         7
#elif SAMPLER_TAIL == 7
#define SAMPLER_SAMPLERCUBE2 s7
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         8
#elif SAMPLER_TAIL == 8
#define SAMPLER_SAMPLERCUBE2 s8
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         9
#elif SAMPLER_TAIL == 9
#define SAMPLER_SAMPLERCUBE2 s9
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         10
#elif SAMPLER_TAIL == 10
#define SAMPLER_SAMPLERCUBE2 s10
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         11
#elif SAMPLER_TAIL == 11
#define SAMPLER_SAMPLERCUBE2 s11
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         12
#elif SAMPLER_TAIL == 12
#define SAMPLER_SAMPLERCUBE2 s12
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         13
#elif SAMPLER_TAIL == 13
#define SAMPLER_SAMPLERCUBE2 s13
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         14
#elif SAMPLER_TAIL == 14
#define SAMPLER_SAMPLERCUBE2 s14
#undef  SAMPLER_TAIL
#define SAMPLER_TAIL         15
#elif SAMPLER_TAIL == 15
#define SAMPLER_SAMPLERCUBE2 s15
#endif
#endif

#endif  // ifndef __SAMPLER_DEF_H__

Internal Project Name

The internal project is TF Gun according to multiple mentions in the name of the executable, strings/compilation directories in them, assemblies and the game's assets. TF Gun most likely means Transformers Gun as in TransFormers Gun Game.

References