string description = "Flying Lab Character No-Normal Map Shader";


#define USE_SPECULAR 0

#if LOWEND
#undef USING_RAMP
#undef SHOW_SHADOWS
#define SHOW_SHADOWS 0
#undef SHADOW_SAMPLE
#define SHADOW_SAMPLE 1
#else
#define USING_RAMP 1
#endif

#include "shaderAttrs.fxh"
#define NO_IDS


#include "shadows.fxh"
#include "shadows.hlsl"
#include "characterAttrs.fxh"
#include "sphericalHarmonicsAttrs.fxh"
#include "characterBlendNoNormals.hlsl"


#define ID 1
// 1/31

technique Character
{
	pass shadowPass {
		VertexShader = compile vs_2_0 shadowVSMain(Bones, modelViewProjection, ID);

		PixelShader = compile PS20_OR_PS14 shadowPixelAlpha(baseTextureSampler, ID);

		CullMode = NONE;
		
		AlphaFunc = GREATER; 
		AlphaTestEnable = TRUE;
		AlphaRef = 128;

	} 
	pass characterPass {
		
		VertexShader = compile vs_2_0 VSMain(
			eyePos,
			modelViewProjection,
			modelWorld,
			shadowTextureWorldTransform,
			Bones,
			sunDirectionWorld,
			vRimLightDirectionWorld,
			vRimLightColor,
			vPointLightPosWorld,
			fPointLightMaxDistance,
			vPointLightColor,
			fogColor,
			fogParams,
			ID,
			
			SHcoeff0,
			SHcoeff1,
			SHcoeff2,
			SHcoeff3,
			SHcoeff4,
			SHcoeff5,
			SHcoeff6,
			SHcoeff7,
			SHcoeff8,
			SHcoeff9
			 );
	  
		PixelShader = compile PS20_OR_PS14 PSMain(
			baseTextureSampler,

#ifdef USING_RAMP
			rampTextureSampler,
#endif
			samplerShadow,
			sunColor,
			sunAmbient,
			shadowSampleScale
			 );
		
		AlphaFunc = GREATER;
		AlphaTestEnable = TRUE;
		AlphaRef = 128;	
		ZWriteEnable = TRUE;
		CullMode = NONE;

	}
}

