We just reached 30,000 articles on this wiki! 🥳
If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Demon Gaze

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Demon Gaze

Developers: Kadokawa Games, Experience Inc.
Publishers: Kadokawa Games (JP), NIS America (NA/EU)
Platform: PlayStation Vita
Released in JP: January 24, 2013
Released in US: April 22, 2014
Released in EU: April 25, 2014


GraphicsIcon.png This game has unused graphics.
TextIcon.png This game has unused text.


Demon Gaze is an RPG/dating sim thing with a Vocaloid soundtrack.


Unused Graphics

Demon-Gaze-OP-Placeholder.png

This is a placeholder image for the opening video. The text translates to "Playing Back Opening Movie".


Placeholder Final
Demon-Gaze-Fran-Placeholder.png Demon-Gaze-Fran-Final.png

A placeholder portrait for Fran Pendoll. The Japanese text reads "Fran Underwear: Kiss". The placeholder is darker in color, and has a harsher dithering effect.


(Translations: GlitterBerri)
(Source: Original TCRF research)

Unused Text

lang.ini

// SCEJ:circle	0
// SCEA:cross	1
// SCEE:cross	2
Decide_Assign=1

What appears to be a region selection file. lang.ini sits on the root of the file system.

shader_vertexshader.fx

This is a shader file that was carried over from Students of Round, a game that was also developed by Experience Inc. There are various notes spread throughout the file.

Cacti may speak Japanese, but do they speak it well?
...But does it make sense?
The translations on this page need to be proofread. If you are fluent enough in this language, please make any corrections necessary!
// SHADER FILE -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//Win32/XBOX 360 FXC.EXE : Students of Round [TAB 4]
//  シェーダ総合
//                    Programmed by K.Kisu 2010/06/14 - 2010/06/15
//                 Modification by T.Sakai 2010/07/02 - 2010/08/24
// Copyright (c) 2010 Team Muramasa All Rights Reserved.
//
//  Date            Design      Log
// ---------------------------------------------------------------
//  2010-07-02      T.Sakai    ワイプ用の頂点、ピクセルシェーダーの追加
//  2010-07-21      T.Sakai    モデル用の頂点シェーダーにフォグ処理を追加。
//  2010-07-21      T.Sakai    モデル用のピクセルシェーダーを追加。
//  2010-08-24		T.Sakai	   ワイプ用のピクセルシェーダーを分離
//  2010-08-25		T.Sakai	   モデル用のピクセルシェーダーを分離
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//今のところ頂点シェーダだけだけど、そのうちピクセルシェーダも統合する可能性あり

#define TRUE	1
#define FALSE 	0
//==================================================================
// パラメータや構造体設定
//==================================================================
float4x4 matFix;		// World * View * Proj
float4x4 matWorld;		// World変換
float4x4 matView;		// View変換
float4x4 matProj;		// 射影変換
// 固定データ
float4 gBasicColor = {1.0f, 1.0f, 1.0f, 1.0f};
float2 gBasicUV    = {0.0f, 0.0f};

sampler TextureSampler0 : register(s0);
sampler TextureSampler1 : register(s1);
float gModelColorRate;
float gModelAlphaRate;
float4 gFogParam;
float4 gFogColor;
uniform float4 gGammma	: register(c0);
uniform float2x2 gBumpMat : register(c8);
float gIsUseFog : register(c20);
uniform float 	gWipeCnt  :	register(c25);	// c0使って大丈夫か?
uniform float 	gIsWipeIn :	register(c26);

// 入力データ
//ePrimVerDec_Model
struct VS_IN_MODEL
{
	float4 ObjPos	: POSITION;		// 頂点座標
	float4 Normal	: NORMAL;		// 法線ベクトル
	float4 DifColor	: COLOR0;		// デフューズ色
	float4 Tex		: TEXCOORD0;	// テクスチャUV
};
//ePrimVerDec_Sprite
struct VS_IN_SPRITE
{
	float4 ObjPos	: POSITION;		// 頂点座標
	float4 DifColor	: COLOR0;		// 頂点色
	float4 SpeColor	: COLOR1;		// スペキュラ色
	float4 Tex		: TEXCOORD0;	// テクスチャUV
};
//ePrimVerDec_Other
struct VS_IN_OTHER
{
	float4 ObjPos	: POSITION;		// 頂点座標
//	float1 PSize	: POSITION;		// PSIZE
	float4 DifColor	: COLOR0;		// 頂点色
	float4 Tex		: TEXCOORD0;	// テクスチャUV
};
// 出力データ
struct VS_OUT
{
	float4 ProjPos	: POSITION;		// 頂点座標
	float4 DifColor	: COLOR0;		// デフューズ色
	float4 SpeColor	: COLOR1;		// スペキュラ色
	float4 Tex		: TEXCOORD;		// テクスチャUV
};
struct VS_OUT_NO_SPECOLOR
{
	float4 ProjPos	: POSITION;		// 頂点座標
	float4 DifColor	: COLOR0;		// デフューズ色
//	float4 SpeColor	: COLOR1;		// スペキュラ色
	float4 Tex		: TEXCOORD0;		// テクスチャUV
};
struct VS_OUT_MODEL
{
	float4 ProjPos	: POSITION;		// 頂点座標
	float4 DifColor	: COLOR0;		// デフューズ色
//	float4 SpeColor	: COLOR1;		// スペキュラ色
	float4 Tex		: TEXCOORD;		// テクスチャUV
	float4 FogColor	: TEXCOORD1;	// ライトベクトル
};
struct VS_IN_WIPE
{
	float4 ProjPos	: POSITION;		// 頂点座標
	float4 DifColor	: COLOR0;		// デフューズ色
//	float4 SpeColor	: COLOR1;		// スペキュラ色
	float4 Tex		: TEXCOORD;		// テクスチャUV
};
struct VS_OUT_WIPE
{
	float4 ProjPos	: POSITION;		// 頂点座標
	float4 DifColor	: COLOR0;		// デフューズ色
//	float4 SpeColor	: COLOR1;		// スペキュラ色
	float4 Tex		: TEXCOORD;		// テクスチャUV
};
struct PS_WIPE_IN
{
	float4 ProjPos	: POSITION;		// 頂点座標
	float4 DifColor	: COLOR0;		// デフューズ色
	float2 Tex0		: TEXCOORD0;
};
struct VS_IN_TILE
{
	float4 ObjPos	: POSITION;		// 頂点座標
	float4 DifColor	: COLOR0;		// 頂点色
	float4 SpeColor	: COLOR1;		// スペキュラ色
};
struct VS_OUT_NO_TEX_NO_SPECOLOR
{
	float4 ProjPos	: POSITION;		// 頂点座標
	float4 DifColor	: COLOR0;		// デフューズ色
};
//==================================================================
// 頂点シェーダ - モデル
//==================================================================
//入力された座標を変換して出力します
VS_OUT_MODEL ExpVertexShader_Model(VS_IN_MODEL In)
{
	VS_OUT_MODEL Out = (VS_OUT_MODEL)0;

	Out.ProjPos = mul( In.ObjPos, matFix);
	// 法線ベクトル変換
	// デフューズ色確定
	Out.DifColor = In.DifColor;

	// スペキュラ色確定
//	Out.SpeColor = gBasicColor;
	// テクスチャUV確定
	Out.Tex = In.Tex;
	
//	float z = Out.ProjPos.z / Out.ProjPos.w;
	float fog;
	
	// とりあえずなんとなくな感じでフォグを入れてみる
	if( gIsUseFog )
	{
		fog = (gFogParam.y - Out.ProjPos.z) / (gFogParam.y - gFogParam.x);
		fog = 1.0f - fog;
		fog = min( 1.0f , fog  );
		fog = max( 0.0f , fog  );
		Out.FogColor.xyz = gFogColor.xyz;
		Out.FogColor.w = fog;
	}
	else{
		Out.FogColor = 1.0f;
	}
	return Out;
}
//==================================================================
// 頂点シェーダ - スプライト
//==================================================================
//入力されたデータをそのまま出力します
VS_OUT_NO_SPECOLOR ExpVertexShader_Sprite(VS_IN_SPRITE In)
{
	VS_OUT_NO_SPECOLOR Out = (VS_OUT_NO_SPECOLOR)0;

	// 頂点座標
	Out.ProjPos = In.ObjPos;
	// デフューズ色
	Out.DifColor = In.DifColor;
	// スペキュラ色
//	Out.SpeColor = In.SpeColor;
	// テクスチャUV
	Out.Tex = In.Tex;

	return Out;
}
//==================================================================
// 頂点シェーダ - その他
//==================================================================
//入力されたデータをそのまま出力します
VS_OUT_NO_SPECOLOR ExpVertexShader_Other(VS_IN_OTHER In)
{
	VS_OUT_NO_SPECOLOR Out = (VS_OUT_NO_SPECOLOR)0;

	// 頂点座標
	Out.ProjPos = mul( In.ObjPos, matFix);
	// デフューズ色
	Out.DifColor = In.DifColor;
	// スペキュラ色
//	Out.SpeColor = gBasicColor;
	// テクスチャUV
	Out.Tex = In.Tex;

	return Out;
}
//==================================================================
// 頂点シェーダ - ワイプ
//==================================================================
//入力されたデータをそのまま出力します
VS_OUT_WIPE ExpVertexShader_Wipe(VS_IN_WIPE In)
{
	VS_OUT_WIPE Out = (VS_OUT_WIPE)0;

	// テクスチャUV
	Out.Tex = In.Tex;
	Out.DifColor = In.DifColor;

	return Out;
}
//==================================================================
// 頂点シェーダ - タイル
//==================================================================
//入力されたデータをそのまま出力します
VS_OUT_NO_TEX_NO_SPECOLOR ExpVS_TileShader( VS_IN_TILE In )
{
	VS_OUT_NO_TEX_NO_SPECOLOR Out = (VS_OUT_NO_TEX_NO_SPECOLOR)0;

	// 頂点座標
	Out.ProjPos = In.ObjPos;
	// デフューズ色
	Out.DifColor = In.DifColor;
	// スペキュラ色
//	Out.SpeColor = In.SpeColor;

	return Out;
}

//==================================================================
// テクニック
//==================================================================
// Model
technique ExpVS_Model
{
	pass P0
	{
		VertexShader = compile vs_2_0 ExpVertexShader_Model();
		// フォグを処理するために、ピクセルシェーダーを追加
//#if _XBOX == 1
//		PixelShader = compile ps_2_0 ExpPixelShader_Model();
//#endif
	}
}
// Sprite
technique ExpVS_Sprite
{
	pass P0
	{
		VertexShader = compile vs_2_0 ExpVertexShader_Sprite();
	}
}
// Other
technique ExpVS_Other
{
	pass P0
	{
		VertexShader = compile vs_2_0 ExpVertexShader_Other();
	}
}
// Wipe
technique ExpFX_Wipe
{
	pass P0
	{
		VertexShader = compile vs_3_0 ExpVertexShader_Sprite();
	}
}
// Other
technique ExpVS_Tile
{
	pass P0
	{
		VertexShader = compile vs_2_0 ExpVS_TileShader();
	}
}

//------------------------------------------------------
// ピクセルシェーダー定義
//------------------------------------------------------
//======================================================
// 基本となるピクセルシェーダー
// ColorOP: Tex*Diff AlphaOP: Tex*Diff
//======================================================
float4 ExpPS_Default( VS_OUT_NO_SPECOLOR In ) : COLOR
{
	float4 TexColor = tex2D( TextureSampler0 , In.Tex.xy );
	float4 Out = In.DifColor * TexColor;
	Out.rgb += gGammma.rgb;
	return Out;
}
//=======================================================
// フラッシュ用シェーダー
// ColorOP: Tex+Diff AlphaOP: Tex*Diff
//=======================================================
float4 ExpPS_Flash( VS_OUT_NO_SPECOLOR In ) : COLOR
{
	float4 TexColor = tex2D( TextureSampler0 , In.Tex.xy );
	float4 Out;
	Out.rgb = In.DifColor.rgb + TexColor.rgb;
	Out.a = In.DifColor.a * TexColor.a;
	Out.rgb += gGammma.rgb;
	return Out;
}
//=======================================================
// モノクロシェーダ
//  ColorOP: Tex*Diff<-モノ変換 AlphaOP:Tex*Diff
//=======================================================
float4 ExpPS_Mono( VS_OUT_NO_SPECOLOR In ) : COLOR
{
	float4 TexColor = tex2D( TextureSampler0 , In.Tex.xy );
	float4 Color = In.DifColor * TexColor; 
	float4 Out = Color;
	float4 tomono = float4( 0.298912, 0.586611, 0.114478, 0.0 );
	Out.rgb = dot( Color, tomono );
	Out.a = Color.a;
	Out.rgb += gGammma.rgb;
	return Out;
}
//=======================================================
// 生ポリ用シェーダー
//  ColorOP: ColorOP: Diff AlphaOP: Diff
//=======================================================
float4 ExpPS_Poli( VS_OUT_NO_TEX_NO_SPECOLOR In ) : COLOR
{
	float4 Out = In.DifColor;
	Out.rgb += gGammma.rgb;
	return Out;	
}
//========================================================
// バンプマップ付シェーダー
// ColorOP: Tex*Diff AlphaOP: Tex*Diff
//
// ※たぶんこんな感じで記述したので、間違ってるかも。
//========================================================
float4 ExpPS_Bump( VS_OUT_NO_SPECOLOR In ) : COLOR
{
	float2 Bump = tex2D( TextureSampler1 , In.Tex.xy ).xy;
	Bump.x = Bump.x*gBumpMat._m00 + Bump.y*gBumpMat._m10;
	Bump.y = Bump.x*gBumpMat._m01 + Bump.y*gBumpMat._m11;

	float4 TexColor = tex2D( TextureSampler0 , In.Tex.xy + Bump.xy );
	float4 Out = In.DifColor * TexColor;
	Out.rgb += gGammma.rgb;
	return Out;	
}
//========================================================
// バンプマップのフラッシング付シェーダー
// ColorOP: ColorOP: Tex+Diff AlphaOP: Tex*Diff
//
// ※たぶんこんな感じで記述したので、間違ってるかも。
//========================================================
float4 ExpPS_BumpFlash( VS_OUT_NO_SPECOLOR In ) : COLOR
{
	float2 Bump = tex2D( TextureSampler1 , In.Tex.xy ).xy;
	Bump.x = Bump.x*gBumpMat._m00 + Bump.y*gBumpMat._m10;
	Bump.y = Bump.x*gBumpMat._m01 + Bump.y*gBumpMat._m11;

	float4 TexColor = tex2D( TextureSampler0 , In.Tex.xy + Bump.xy );
	float4 Out;
	Out.rgb = In.DifColor.rgb + TexColor.rgb;
	Out.a = In.DifColor.a * TexColor.a;
	Out.rgb += gGammma.rgb;
	return Out;		
}
//==================================================================
// ピクセルシェーダ - ワイプ
//==================================================================
float4 ExpPS_Wipe(VS_OUT_NO_SPECOLOR In) : COLOR
{
	float4 Out;
	float4 Tex0Color = tex2D( TextureSampler0, In.Tex );
	float Alpha = 0.0f;
	if( gIsWipeIn ){
		Alpha = 1.0f - ( Tex0Color.a * gWipeCnt );
	}
	else{
		Alpha = ( Tex0Color.a * gWipeCnt );
	}
#if TARGET != WIN32
	dbgprint("Alpha = {0}, gWipeCnt = {1} ,gIsWipeIn = {2} ", Alpha, gWipeCnt, gIsWipeIn );
#endif
	Alpha = min( Alpha , 1.0f );
	Alpha = max( Alpha , 0.0f );
	
	Out = float4( 0, 0, 0, Alpha );
	return Out;
}
//==================================================================
// ピクセルシェーダ - モデル
//==================================================================
float4 ExpPS_Model( VS_OUT_MODEL In )	: COLOR
{	
	float4 TexColor = tex2D( TextureSampler0 , In.Tex ); // 元になる色
	float4 Out = TexColor * In.DifColor;

	// とりあえずなんとなくな感じでフォグを入れてみる
	if( gIsUseFog ){
		Out.rgb = lerp( Out.rgb , In.FogColor.rgb , In.FogColor.w );
	}
	// ガンマ値を入れていなかったので、ガンマ値を入れる
	Out.rgb += gGammma.rgb;

	return Out;
}

shader_vertexshader.fx (translated)

// SHADER FILE -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//Win32/XBOX 360 FXC.EXE : Students of Round [TAB 4]
//  Shader Integration
//                    Programmed by K.Kisu 2010/06/14 - 2010/06/15
//                 Modification by T.Sakai 2010/07/02 - 2010/08/24
// Copyright (c) 2010 Team Muramasa All Rights Reserved.
//
//  Date            Design      Log
// ---------------------------------------------------------------
//  2010-07-02      T.Sakai    Vector shader for wipe, pixel shader implemented
//  2010-07-21      T.Sakai    Implemented fog for models in vertex shader
//  2010-07-21      T.Sakai    Implemented pixel shader for models
//  2010-08-24		T.Sakai	   Separated the pixel shader for wipe
//  2010-08-25		T.Sakai	   Separated pixel shader for models
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//At this moment only the vertex shader is implemented, but it's likely pixel shader will be too

#define TRUE	1
#define FALSE 	0
//==================================================================
// The structure of variables et cetera
//==================================================================
float4x4 matFix;		// World * View * Proj
float4x4 matWorld;		// World transform
float4x4 matView;		// View transform
float4x4 matProj;		// Projection transform
// Constants
float4 gBasicColor = {1.0f, 1.0f, 1.0f, 1.0f};
float2 gBasicUV    = {0.0f, 0.0f};

sampler TextureSampler0 : register(s0);
sampler TextureSampler1 : register(s1);
float gModelColorRate;
float gModelAlphaRate;
float4 gFogParam;
float4 gFogColor;
uniform float4 gGammma	: register(c0);
uniform float2x2 gBumpMat : register(c8);
float gIsUseFog : register(c20);
uniform float 	gWipeCnt  :	register(c25);	// would it be okay to use c0?
uniform float 	gIsWipeIn :	register(c26);

// Inputs
//ePrimVerDec_Model
struct VS_IN_MODEL
{
	float4 ObjPos	: POSITION;		// vertex coordinates
	float4 Normal	: NORMAL;		// the normal vector
	float4 DifColor	: COLOR0;		// diffusion color
	float4 Tex		: TEXCOORD0;	// UV coordinates for the texture
};
//ePrimVerDec_Sprite
struct VS_IN_SPRITE
{
	float4 ObjPos	: POSITION;		// vertex coordinates
	float4 DifColor	: COLOR0;		// vertex color
	float4 SpeColor	: COLOR1;		// specular color
	float4 Tex		: TEXCOORD0;	// UV coordinates for the texture
};
//ePrimVerDec_Other
struct VS_IN_OTHER
{
	float4 ObjPos	: POSITION;		// vertex coordinates
//	float1 PSize	: POSITION;		// PSIZE
	float4 DifColor	: COLOR0;		// vertex color
	float4 Tex		: TEXCOORD0;	// UV coordinates for the texture
};
// output
struct VS_OUT
{
	float4 ProjPos	: POSITION;		// vertex coordinates
	float4 DifColor	: COLOR0;		// diffusion color
	float4 SpeColor	: COLOR1;		// specular color
	float4 Tex		: TEXCOORD;		// UV coordinates for the texture
};
struct VS_OUT_NO_SPECOLOR
{
	float4 ProjPos	: POSITION;		// vertex coordinates
	float4 DifColor	: COLOR0;		// diffusion color
//	float4 SpeColor	: COLOR1;		// specular color
	float4 Tex		: TEXCOORD0;		// UV coordinates for the texture
};
struct VS_OUT_MODEL
{
	float4 ProjPos	: POSITION;		// vertex coordinates
	float4 DifColor	: COLOR0;		// diffusion color
//	float4 SpeColor	: COLOR1;		// specular color
	float4 Tex		: TEXCOORD;		// UV coordinates for the texture
	float4 FogColor	: TEXCOORD1;	// light vector
};
struct VS_IN_WIPE
{
	float4 ProjPos	: POSITION;		// vertex coordinates
	float4 DifColor	: COLOR0;		// diffusion color
//	float4 SpeColor	: COLOR1;		// specular color
	float4 Tex		: TEXCOORD;		// UV coordinates for the texture
};
struct VS_OUT_WIPE
{
	float4 ProjPos	: POSITION;		// vertex coordinates
	float4 DifColor	: COLOR0;		// diffusion color
//	float4 SpeColor	: COLOR1;		// specular color
	float4 Tex		: TEXCOORD;		// UV coordinates for the texture
};
struct PS_WIPE_IN
{
	float4 ProjPos	: POSITION;		// vertex coordinates
	float4 DifColor	: COLOR0;		// diffusion color
	float2 Tex0		: TEXCOORD0;
};
struct VS_IN_TILE
{
	float4 ObjPos	: POSITION;		// vertex coordinates
	float4 DifColor	: COLOR0;		// vertex color
	float4 SpeColor	: COLOR1;		// specular color
};
struct VS_OUT_NO_TEX_NO_SPECOLOR
{
	float4 ProjPos	: POSITION;		// vertex coordinates
	float4 DifColor	: COLOR0;		// diffusion color
};
//==================================================================
// Vertex Shader - Models
//==================================================================
//Transform the given inputs
VS_OUT_MODEL ExpVertexShader_Model(VS_IN_MODEL In)
{
	VS_OUT_MODEL Out = (VS_OUT_MODEL)0;

	Out.ProjPos = mul( In.ObjPos, matFix);
	// Transform the normal vector
	// defining the diffusion color
	Out.DifColor = In.DifColor;

	// defining the specular color
//	Out.SpeColor = gBasicColor;
	// defining texture UV coordinates
	Out.Tex = In.Tex;
	
//	float z = Out.ProjPos.z / Out.ProjPos.w;
	float fog;
	
	// just add the fog in some way for now
	if( gIsUseFog )
	{
		fog = (gFogParam.y - Out.ProjPos.z) / (gFogParam.y - gFogParam.x);
		fog = 1.0f - fog;
		fog = min( 1.0f , fog  );
		fog = max( 0.0f , fog  );
		Out.FogColor.xyz = gFogColor.xyz;
		Out.FogColor.w = fog;
	}
	else{
		Out.FogColor = 1.0f;
	}
	return Out;
}
//==================================================================
// Vertex Shader - Sprites
//==================================================================
//don't transform the input at all
VS_OUT_NO_SPECOLOR ExpVertexShader_Sprite(VS_IN_SPRITE In)
{
	VS_OUT_NO_SPECOLOR Out = (VS_OUT_NO_SPECOLOR)0;

	// vertex coordinates
	Out.ProjPos = In.ObjPos;
	// diffusion color
	Out.DifColor = In.DifColor;
	// specular color
//	Out.SpeColor = In.SpeColor;
	// texture UV coordinates
	Out.Tex = In.Tex;

	return Out;
}
//==================================================================
// Vertex Shader - Others
//==================================================================
//don't transform the input at all
VS_OUT_NO_SPECOLOR ExpVertexShader_Other(VS_IN_OTHER In)
{
	VS_OUT_NO_SPECOLOR Out = (VS_OUT_NO_SPECOLOR)0;

	// vertex coordinates
	Out.ProjPos = mul( In.ObjPos, matFix);
	// diffusion color
	Out.DifColor = In.DifColor;
	// specular color
//	Out.SpeColor = gBasicColor;
	// texture UV coordinates
	Out.Tex = In.Tex;

	return Out;
}
//==================================================================
// Vertex Shader - Wipe
//==================================================================
//don't transform the input at all
VS_OUT_WIPE ExpVertexShader_Wipe(VS_IN_WIPE In)
{
	VS_OUT_WIPE Out = (VS_OUT_WIPE)0;

	// texture UV coordinates
	Out.Tex = In.Tex;
	Out.DifColor = In.DifColor;

	return Out;
}
//==================================================================
// Vertex Shader - Tiles
//==================================================================
//don't transform the input at all
VS_OUT_NO_TEX_NO_SPECOLOR ExpVS_TileShader( VS_IN_TILE In )
{
	VS_OUT_NO_TEX_NO_SPECOLOR Out = (VS_OUT_NO_TEX_NO_SPECOLOR)0;

	// vertex coordinates
	Out.ProjPos = In.ObjPos;
	// diffusion color
	Out.DifColor = In.DifColor;
	// specular color
//	Out.SpeColor = In.SpeColor;

	return Out;
}

//==================================================================
// Techniques
//==================================================================
// Model
technique ExpVS_Model
{
	pass P0
	{
		VertexShader = compile vs_2_0 ExpVertexShader_Model();
		// add the pixel shader for fog
//#if _XBOX == 1
//		PixelShader = compile ps_2_0 ExpPixelShader_Model();
//#endif
	}
}
// Sprite
technique ExpVS_Sprite
{
	pass P0
	{
		VertexShader = compile vs_2_0 ExpVertexShader_Sprite();
	}
}
// Other
technique ExpVS_Other
{
	pass P0
	{
		VertexShader = compile vs_2_0 ExpVertexShader_Other();
	}
}
// Wipe
technique ExpFX_Wipe
{
	pass P0
	{
		VertexShader = compile vs_3_0 ExpVertexShader_Sprite();
	}
}
// Other
technique ExpVS_Tile
{
	pass P0
	{
		VertexShader = compile vs_2_0 ExpVS_TileShader();
	}
}

//------------------------------------------------------
// Defining the pixel shader
//------------------------------------------------------
//======================================================
// The basic pixel shader
// ColorOP: Tex*Diff AlphaOP: Tex*Diff
//======================================================
float4 ExpPS_Default( VS_OUT_NO_SPECOLOR In ) : COLOR
{
	float4 TexColor = tex2D( TextureSampler0 , In.Tex.xy );
	float4 Out = In.DifColor * TexColor;
	Out.rgb += gGammma.rgb;
	return Out;
}
//=======================================================
// Pixel shader for flashes
// ColorOP: Tex+Diff AlphaOP: Tex*Diff
//=======================================================
float4 ExpPS_Flash( VS_OUT_NO_SPECOLOR In ) : COLOR
{
	float4 TexColor = tex2D( TextureSampler0 , In.Tex.xy );
	float4 Out;
	Out.rgb = In.DifColor.rgb + TexColor.rgb;
	Out.a = In.DifColor.a * TexColor.a;
	Out.rgb += gGammma.rgb;
	return Out;
}
//=======================================================
// Monochrome shader
//  ColorOP: Tex*Diff<-Monochrome_transformation AlphaOP:Tex*Diff
//=======================================================
float4 ExpPS_Mono( VS_OUT_NO_SPECOLOR In ) : COLOR
{
	float4 TexColor = tex2D( TextureSampler0 , In.Tex.xy );
	float4 Color = In.DifColor * TexColor; 
	float4 Out = Color;
	float4 tomono = float4( 0.298912, 0.586611, 0.114478, 0.0 );
	Out.rgb = dot( Color, tomono );
	Out.a = Color.a;
	Out.rgb += gGammma.rgb;
	return Out;
}
//=======================================================
// The standard polygon shader
//  ColorOP: ColorOP: Diff AlphaOP: Diff
//=======================================================
float4 ExpPS_Poli( VS_OUT_NO_TEX_NO_SPECOLOR In ) : COLOR
{
	float4 Out = In.DifColor;
	Out.rgb += gGammma.rgb;
	return Out;	
}
//========================================================
// Shader for bumpmaps
// ColorOP: Tex*Diff AlphaOP: Tex*Diff
//
// * I feel like there's a mistake in the description here.
//========================================================
float4 ExpPS_Bump( VS_OUT_NO_SPECOLOR In ) : COLOR
{
	float2 Bump = tex2D( TextureSampler1 , In.Tex.xy ).xy;
	Bump.x = Bump.x*gBumpMat._m00 + Bump.y*gBumpMat._m10;
	Bump.y = Bump.x*gBumpMat._m01 + Bump.y*gBumpMat._m11;

	float4 TexColor = tex2D( TextureSampler0 , In.Tex.xy + Bump.xy );
	float4 Out = In.DifColor * TexColor;
	Out.rgb += gGammma.rgb;
	return Out;	
}
//========================================================
// Shader for bumpmaps and flashing
// ColorOP: ColorOP: Tex+Diff AlphaOP: Tex*Diff
//
// * I feel like there's a mistake in the description here.
//========================================================
float4 ExpPS_BumpFlash( VS_OUT_NO_SPECOLOR In ) : COLOR
{
	float2 Bump = tex2D( TextureSampler1 , In.Tex.xy ).xy;
	Bump.x = Bump.x*gBumpMat._m00 + Bump.y*gBumpMat._m10;
	Bump.y = Bump.x*gBumpMat._m01 + Bump.y*gBumpMat._m11;

	float4 TexColor = tex2D( TextureSampler0 , In.Tex.xy + Bump.xy );
	float4 Out;
	Out.rgb = In.DifColor.rgb + TexColor.rgb;
	Out.a = In.DifColor.a * TexColor.a;
	Out.rgb += gGammma.rgb;
	return Out;		
}
//==================================================================
// Pixel Shader - Wipe
//==================================================================
float4 ExpPS_Wipe(VS_OUT_NO_SPECOLOR In) : COLOR
{
	float4 Out;
	float4 Tex0Color = tex2D( TextureSampler0, In.Tex );
	float Alpha = 0.0f;
	if( gIsWipeIn ){
		Alpha = 1.0f - ( Tex0Color.a * gWipeCnt );
	}
	else{
		Alpha = ( Tex0Color.a * gWipeCnt );
	}
#if TARGET != WIN32
	dbgprint("Alpha = {0}, gWipeCnt = {1} ,gIsWipeIn = {2} ", Alpha, gWipeCnt, gIsWipeIn );
#endif
	Alpha = min( Alpha , 1.0f );
	Alpha = max( Alpha , 0.0f );
	
	Out = float4( 0, 0, 0, Alpha );
	return Out;
}
//==================================================================
// Pixel Shader - Models
//==================================================================
float4 ExpPS_Model( VS_OUT_MODEL In )	: COLOR
{	
	float4 TexColor = tex2D( TextureSampler0 , In.Tex ); // Original color
	float4 Out = TexColor * In.DifColor;

	// just add the fog in some way for now
	if( gIsUseFog ){
		Out.rgb = lerp( Out.rgb , In.FogColor.rgb , In.FogColor.w );
	}
	// add the gamma value because it isn't there yet
	Out.rgb += gGammma.rgb;

	return Out;
}