//////////////////////////////////////////////////////////////////////////////////////////
//
//  FILE        :  Asura_D3D_PS_Object_Reflective.cpp
//
//  CREATED     :  Richard J. Fine  (29.3.2005)
//
//  Copyright (C) 2005 Rebellion, All Rights Reserved.
//
//////////////////////////////////////////////////////////////////////////////////////////


#include "Core/Asura.h"

// This file's header.
#include "Rendering/Asura_Direct3D_Shaders.h"

static const char* g_szShaderCode =
{
	"ps.1.1				\n"
	"tex t0				\n"	// base texture
	"tex t1				\n" // reflection map

	"mul_x2 r0, t0, v0 \n" // base * lighting * 2

	"mul t1.a, t1.a, t0.a \n" // reflectivity = reflection map alpha * base map alpha

	"mad r0.rgb, t1, t1.a, r0 \n"

	"mov r0.a, v0.a \n"
};

static Asura_Direct3D_PixelShader xReflectiveSkinShader(ASURA_D3D_PS_OBJECT_REFLECTIVE, g_szShaderCode);

static const char* g_szTAShaderCode =
{
	"ps.1.1				\n"
	"tex t0				\n"	// base texture
	"tex t1				\n" // reflection map

	"mul_x2 r0, t0, v0 \n" // base * lighting * 2

	"mul t1.a, t1.a, t0.a \n" // reflectivity = reflection map alpha * base map alpha

	"mad r0.rgb, t1, t1.a, r0 \n"

	"mul r0.a, t0.a, v0.a \n"
};

static Asura_Direct3D_PixelShader xReflectiveTASkinShader(ASURA_D3D_PS_OBJECT_REFLECTIVE_TEXALPHA, g_szTAShaderCode);
