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

Chess Titans

From The Cutting Room Floor
Jump to navigation Jump to search
This page contains changes which are not marked for translation.
Other languages:
English • ‎español • ‎italiano • ‎polski • ‎русский • ‎中文(中国大陆)‎ • ‎한국어

Title Screen

Chess Titans

Developer: Oberon Games
Publisher: Microsoft
Platform: Windows
Released internationally: January 30, 2007


SourceIcon.png This game has uncompiled source code.
DevTextIcon.png This game has hidden development-related text.
GraphicsIcon.png This game has unused graphics.
DebugIcon.png This game has debugging material.


BugsIcon.png This game has a bugs page

Hmmm...
To do:
  • See if more of the options work in the Vista version. This was tested with the Windows 7 version.
  • There's much more to document. A good place to start would be to use Resource Hacker on the game executable and DLLs.
  • Add sub-page for "Media Center Chess Titans", a full-screen version of the game embedded into the game's executable which although is technically used as it can be launched from Windows Media Center, it is not documented in any Help menus, and it also contains a whole bunch of unused content the normal game doesn't.
  • Multiple prototypes of this game exist in various Windows Longhorn/Vista Beta builds, collect all of them and create a Prototypes sub-page.
  • Win8 DP1 (6.2.8102.0 (winmain_win8m3.110823-1455)) saw the removal of the built-in Windows games from the edition manifest for Prerelease(ARM); this change would be later expanded through the removal of most Win7 client editions (excluding Starter(N), Professional(N) and Enterprise(N)) from the source tree during early 830x, orphaning the games entirely. The only catch to this, however, is that the Win7 games were still compiled from until as late as Win10 v1703, which is when MS decided to ditch the rest of the older editions entirely. The binaries were included in the provided repair content sources for the following builds: 8250 (Win8 Consumer Preview), 8400 (Win8 Release Preview), 9200 (Win8 RTM), 9431 (Win8.1 BlueMP), 9600 (Blue RTM), 10586 (Win10 v1511) and 14393 x86 (Win10 v1607). As the enablement flags for the games are still present in every SKU's product policies, it'd be a good idea if someone were to re-enable them through ProductPolicyEditor and look through any noticeable code changes from within their binaries.
    • Related note: The main Chess Titans dynamic link library in the repair content for Win8 Consumer Preview (and later) use MSDelta compression (treated as a null update delta), and will cause DISM to complain about invalid SHA-256 hashes; this also causes the Win7 editions to fail staging entirely with code STATUS_SXS_FILE_HASH_MISMATCH unless the offending component is either decompressed first or removed from the respective edition manifest.

One of the new games included with Windows Vista and 7.

Sub-Pages

Read about notable bugs and errors in this game.
Bugs

Debug Menu

Hmmm...
To do:
See if the Full Speed Render does anything.

Chesstitansdebugmenu.png

As with most other games shipped with Vista and 7, it has an internal g_debugEnabled variable. The options included in this menu are:

  • Rotate Board - Rotates the board to the other side in the 3D view, but doesn't do anything in the 2D view.
  • Self Play - View a game played by two computer players. If a game already began, the game will then start a new one.
  • Toggle Top Down View - Goes to the top-down 2D view, but going back to the 3D view will cause the graphic setting to drop to the lowest-quality 3D setting.
  • Toggle Full Speed Render - Supposedly would make the game run fast on slower computers

XInput Support

An interesting feature that isn't documented anywhere (Help Menu-wise) is XInput (gamepad) support – if the game detects an Xbox 360 controller plugged into a USB port, the P1 corner on the controller will light up, signifying the controller can be used. Possibly undocumented because Oberon Games/Microsoft thought a gamepad would be odd to use. It's a neat little feature, nonetheless.

Controls

Button Effect
Left analog stick/D-Pad/Shoulder Buttons/Triggers Moves the cursor. Oddly, they can also be used to navigate the menu bar.
B/Back Undoes the previous move.
A/X Selects the square the cursor is on. Moving the cursor onto a piece and pressing A/X selects it. Pressing A/X on one of the highlighted squares moves the piece there.
Y/Start Opens the Game Menu.

Shader Code

In Chess.dll, there are several portions of the shader code starting at 12B9358.

float4x4 World;
float4x4 View;
float4x4 Projection;
texture DecalTexture;
texture GradientTexture;


sampler2D DecalSampler = sampler_state
{
    Texture   = (DecalTexture);
    MinFilter = Linear;
    MagFilter = Linear;
    MipFilter = Linear;
    AddressU  = Clamp;
    AddressV  = Clamp;
};


sampler2D DecalSamplerQuick = sampler_state
{
    Texture   = (DecalTexture);
    MinFilter = Point;
    MagFilter = Point;
    MipFilter = Point;
    AddressU  = Clamp;
    AddressV  = Clamp;
};


sampler1D GradientSampler = sampler_state
{
    Texture   = (GradientTexture);
    MinFilter = Linear;
    MagFilter = Linear;
    MipFilter = None; // oh dear god. don't use mips because it'll sample from the lowest mip level when a triangle as the same texture coords for all 3 verts
    AddressU  = Clamp;
};


sampler2D ScreenSampler = sampler_state
{
    Texture   = (DecalTexture);
    MinFilter = Linear;
    MagFilter = Linear;
    MipFilter = Linear;
    AddressU  = Clamp;
    AddressV  = Clamp;
};


sampler2D ScreenSamplerPoint = sampler_state
{
    Texture   = (DecalTexture);
    MinFilter = Point;
    MagFilter = Point;
    MipFilter = Point;
    AddressU  = Clamp;
    AddressV  = Clamp;
};


technique TWorldDecal
{
    pass P0
    {
		WorldTransform[0] = (World);
		ViewTransform = (View);
		ProjectionTransform = (Projection);

        Lighting = false;
        ZEnable = false;
        ZFunc = LessEqual;
        ZWriteEnable = false;

        AlphaBlendEnable = true;
        SrcBlend = SrcAlpha;
        DestBlend = InvSrcAlpha;

		Sampler[0] = (DecalSampler);
		Sampler[1] = (GradientSampler);

		ColorOp[0] = SelectArg1;
		ColorArg1[0] = Texture;
		ColorArg2[0] = Current;
		ColorOp[1] = SelectArg2;
		ColorArg1[1] = Texture;
		ColorArg2[1] = Current;
		ColorOp[2] = Disable;

		AlphaOp[0] = SelectArg1;
		AlphaArg1[0] = Texture;
		AlphaArg2[0] = Current;
		AlphaOp[1] = Modulate;
		AlphaArg1[1] = Texture;
		AlphaArg2[1] = Current;
		AlphaOp[2] = Disable;

        VertexShader = null;
        PixelShader = null;
    }
}


technique TWorldDecalQuick
{
    pass P0
    {
		WorldTransform[0] = (World);
		ViewTransform = (View);
		ProjectionTransform = (Projection);

        Lighting = false;
        ZEnable = false;
        ZFunc = LessEqual;
        ZWriteEnable = false;

        AlphaBlendEnable = true;
        SrcBlend = SrcAlpha;
        DestBlend = InvSrcAlpha;

		Sampler[0] = (DecalSamplerQuick);

		ColorOp[0] = SelectArg1;
		ColorArg1[0] = Texture;
		ColorArg2[0] = Current;
		ColorOp[1] = Disable;

		AlphaOp[0] = SelectArg1;
		AlphaArg1[0] = Texture;
		AlphaArg2[0] = Current;
		AlphaOp[1] = Disable;

        VertexShader = null;
        PixelShader = null;
	}
}


technique TScreenDecal
{
    pass P0
    {
		WorldTransform[0] = (World);
		ViewTransform = (World);
		ProjectionTransform = (World);

        Lighting = false;
        ZEnable = false;
        ZFunc = Always;
        ZWriteEnable = true;

        AlphaBlendEnable = true;
        SrcBlend = SrcAlpha;
        DestBlend = InvSrcAlpha;

		Sampler[0] = (ScreenSampler);
		Sampler[1] = (GradientSampler);

		ColorOp[0] = SelectArg1;
		ColorArg1[0] = Texture;
		ColorArg2[0] = Current;
		ColorOp[1] = SelectArg2;
		ColorArg1[1] = Texture;
		ColorArg2[1] = Current;
		ColorOp[2] = Disable;

		AlphaOp[0] = SelectArg1;
		AlphaArg1[0] = Texture;
		AlphaArg2[0] = Current;
		AlphaOp[1] = Modulate;
		AlphaArg1[1] = Texture;
		AlphaArg2[1] = Current;
		AlphaOp[2] = Disable;

        VertexShader = null;
        PixelShader = null;
    }
}


technique TScreenDecalPoint
{
    pass P0
    {
		WorldTransform[0] = (World);
		ViewTransform = (World);
		ProjectionTransform = (World);

        Lighting = false;
        ZEnable = false;
        ZFunc = Always;
        ZWriteEnable = true;

        AlphaBlendEnable = true;
        SrcBlend = SrcAlpha;
        DestBlend = InvSrcAlpha;

		Sampler[0] = (ScreenSamplerPoint);
		Sampler[1] = (GradientSampler);

		ColorOp[0] = SelectArg1;
		ColorArg1[0] = Texture;
		ColorArg2[0] = Current;
		ColorOp[1] = SelectArg2;
		ColorArg1[1] = Texture;
		ColorArg2[1] = Current;
		ColorOp[2] = Disable;

		AlphaOp[0] = SelectArg1;
		AlphaArg1[0] = Texture;
		AlphaArg2[0] = Current;
		AlphaOp[1] = Modulate;
		AlphaArg1[1] = Texture;
		AlphaArg2[1] = Current;
		AlphaOp[2] = Disable;

        VertexShader = null;
        PixelShader = null;
    }
}


technique TScreenDecalImmediate
{
    pass P0
    {
		WorldTransform[0] = (World);
		ViewTransform = (World);
		ProjectionTransform = (World);

        Lighting = false;
        ZEnable = false;
        ZFunc = Always;
        ZWriteEnable = true;

        AlphaBlendEnable = true;
        SrcBlend = One;
        DestBlend = InvSrcAlpha;

		Sampler[0] = (ScreenSampler);
		Sampler[1] = (GradientSampler);

		ColorOp[0] = SelectArg1;
		ColorArg1[0] = Texture;
		ColorArg2[0] = Current;
		ColorOp[1] = SelectArg2;
		ColorArg1[1] = Texture;
		ColorArg2[1] = Current;
		ColorOp[1] = Disable;

		AlphaOp[0] = SelectArg1;
		AlphaArg1[0] = Texture;
		AlphaArg2[0] = Current;
		AlphaOp[1] = Modulate;
		AlphaArg1[1] = Texture;
		AlphaArg2[1] = Current;
		AlphaOp[1] = Disable;

        VertexShader = null;
        PixelShader = null;
    }
}
float4x4 WorldViewProjection;
float4x4 WorldView;
float4x4 World;
float4x4 View;
float4x4 ViewInv;
float4x4 Projection;
texture AlbedoTexture;
texture ReflTexture;
texture EnvTexture;
float Alpha;


float EnvironmentContribution = 0.25;
float ReflectionStrength = 0.25;
float TrimReflectionStrength = 0.45;


//-----------------------------------------------------------------------------
sampler2D AlbedoSampler = sampler_state
{ 
	Texture   = (AlbedoTexture);
	MipFilter = Linear; 
	MinFilter = Linear;
	MagFilter = Linear;
	AddressU  = Wrap;
	AddressV  = Wrap;
};


sampler2D ReflSampler = sampler_state
{ 
	Texture   = (ReflTexture);
	MipFilter = Point;
	MinFilter = Point;
	MagFilter = Point;
	AddressU  = Clamp;
	AddressV  = Clamp;
};


samplerCUBE EnvSampler = sampler_state
{ 
	Texture   = (EnvTexture);
	MipFilter = Point; 
	MinFilter = Linear;
	MagFilter = Linear;
};


//-----------------------------------------------------------------------------
struct VS_OUTPUT
{
	float4 Position		: POSITION;		// position of the vertex
	float3 Diffuse		: COLOR0;		// diffuse color of the vertex
	float2 TexCoord		: TEXCOORD0;
	float4 ReflCoord	: TEXCOORD1;
	float3 EnvCoord		: TEXCOORD2;
};


//-----------------------------------------------------------------------------
VS_OUTPUT PieceVS(
	uniform float3 ka,
	uniform float3 kd,
	uniform bool bEnvironment,
	uniform bool bReflections,
	float4 Pos		: POSITION,
	float2 TexCoord	: TEXCOORD0,
	float3 Normal	: NORMAL0 )
{
	VS_OUTPUT Output;

	// Output the vetrex position in projection space
	Output.Position = mul( Pos, WorldViewProjection );

	float3 viewNormal = normalize( mul( Normal, (float3x3) WorldView ) );
	float3 L = mul( worldLight, (float3x3) View );
	float3 N = viewNormal;
	float NdotL = saturate( dot( N, L ) );

	float3 ambient = ka;
	float3 diffuse = kd * NdotL;
	Output.Diffuse = ambient + diffuse;

	Output.TexCoord = TexCoord;

	// note: bReflections does nothing
	Output.ReflCoord = float4( 0, 0, 0, 1 );

	if ( bEnvironment )
	{
		float3 viewPos = normalize( mul( Pos, WorldView ) );
		float3 viewReflect = reflect( viewPos, viewNormal );
		float3 worldReflect = mul( viewReflect, (float3x3) ViewInv );
		Output.EnvCoord = worldReflect;
	}
	else
	{
		Output.EnvCoord = float3( 0, 1, 0 );
	}

	return Output;
}


//-----------------------------------------------------------------------------
VS_OUTPUT StandardVS(
	uniform bool bEnvironment,
	uniform bool bReflections,
	float4 Pos		: POSITION,
	float2 TexCoord	: TEXCOORD0,
	float3 Normal	: NORMAL0 )
{
	VS_OUTPUT Output;

	// Output the vetrex position in projection space
	Output.Position = mul( Pos, WorldViewProjection );

	// note: diffuse unused
	Output.Diffuse = float3( 1, 1, 1 );

	Output.TexCoord = TexCoord;

	if ( bReflections )
	{
		Output.ReflCoord.x = Output.Position.x * 0.5 + Output.Position.w * 0.5;
		Output.ReflCoord.y = Output.Position.w * 0.5 - Output.Position.y * 0.5;
		Output.ReflCoord.z = Output.Position.w;
		Output.ReflCoord.w = Output.Position.w;
	}
	else
	{
		Output.ReflCoord = float4( 0, 0, 0, 1 );
	}

	if ( bEnvironment )
	{
		float3 viewNormal = normalize( mul( Normal, (float3x3) WorldView ) );

		float3 viewPos = normalize( mul( Pos, WorldView ) );
		float3 viewReflect = reflect( viewPos, viewNormal );
		float3 worldReflect = mul( viewReflect, (float3x3) ViewInv );
		Output.EnvCoord = worldReflect;
	}
	else
	{
		Output.EnvCoord = float3( 0, 1, 0 );
	}

	return Output;
}


//-----------------------------------------------------------------------------
float4 PiecePS( VS_OUTPUT In, uniform bool bAlbedo, uniform bool bEnvironment, uniform bool bReflections, uniform float reflAmount ) : COLOR0
{
	// note: bReflections does nothing

	if ( bAlbedo )
	{
		float3 Albedo = tex2D( AlbedoSampler, In.TexCoord );

		if ( bEnvironment )
		{
			float3 Environment = texCUBE( EnvSampler, In.EnvCoord ) * reflAmount;
			Albedo = Albedo * environmentTextureAmount;
			return float4( In.Diffuse * Albedo + Environment, Alpha );
		}
		else
		{
			return float4( In.Diffuse * Albedo, Alpha );
		}
	}
	else
	{
		if ( bEnvironment )
		{
			float3 Environment = texCUBE( EnvSampler, In.EnvCoord ) * reflAmount;
			return float4( In.Diffuse + Environment, Alpha );
		}
		else
		{
			return float4( In.Diffuse, Alpha );
		}
	}
}


//-----------------------------------------------------------------------------
float4 BoardPS( VS_OUTPUT In, uniform bool bEnvironment, uniform bool bReflections ) : COLOR0
{
	float3 Albedo = tex2D( AlbedoSampler, In.TexCoord );

	if ( bEnvironment )
	{
		float3 Environment = texCUBE( EnvSampler, In.EnvCoord ) * EnvironmentContribution;
		if ( bReflections )
		{
			float4 Reflections = tex2Dproj( ReflSampler, In.ReflCoord );
			float3 c = lerp( Albedo, Reflections.xyz, Reflections.w * ReflectionStrength );
			return float4( c + Environment, 1 );
		}
		else
		{
			return float4( Albedo + Environment, 1 );
		}
	}
	else
	{
		if ( bReflections )
		{
			float4 Reflections = tex2Dproj( ReflSampler, In.ReflCoord );
			float3 c = lerp( Albedo, Reflections.xyz, Reflections.w * ReflectionStrength );
			return float4( c, 1 );
		}
		else
		{
			return float4( Albedo, 1 );
		}
	}
}


//-----------------------------------------------------------------------------
float4 TablePS( VS_OUTPUT In, uniform bool bEnvironment, uniform bool bReflections ) : COLOR0
{
	// note: bReflections does nothing

	float3 Albedo = tex2D( AlbedoSampler, In.TexCoord );

	if ( bEnvironment )
	{
		float3 Environment = texCUBE( EnvSampler, In.EnvCoord ) * 0.0325;
		return float4( Albedo + Environment, 1 );
	}
	else
	{
		return float4( Albedo, 1 );
	}
}


//-----------------------------------------------------------------------------
float4 TrimPS( VS_OUTPUT In, uniform bool bEnvironment, uniform bool bReflections ) : COLOR0
{
	float3 Albedo = trimColor;

	if ( bEnvironment )
	{
		float3 Environment = texCUBE( EnvSampler, In.EnvCoord ) * EnvironmentContribution;

		if ( bReflections )
		{
			float4 Reflections = tex2Dproj( ReflSampler, In.ReflCoord );
			float3 c = lerp( Albedo, Reflections.xyz, Reflections.w * TrimReflectionStrength );
			return float4( c + Environment, 1 );
		}
		else
		{
			return float4( Albedo + Environment, 1 );
		}
	}
	else
	{
		if ( bReflections )
		{
			float4 Reflections = tex2Dproj( ReflSampler, In.ReflCoord );
			float3 c = lerp( Albedo, Reflections.xyz, Reflections.w * TrimReflectionStrength );
			return float4( c, 1 );
		}
		else
		{
			return float4( Albedo, 1 );
		}
	}
}


//-----------------------------------------------------------------------------
technique TWhite_EnvironmentReflections
{
	pass P0
	{
		AlphaBlendEnable = true;
		SrcBlend = SrcAlpha;
		DestBlend = InvSrcAlpha;

		VertexShader = compile vs_1_1 PieceVS( kaWhite, kdWhite, true, true );
		PixelShader  = compile ps_1_4 PiecePS( pieceAlbedo, true, true, reflWhite );
	}
}


technique TBlack_EnvironmentReflections
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = true;
		SrcBlend = SrcAlpha;
		DestBlend = InvSrcAlpha;

		VertexShader = compile vs_1_1 PieceVS( kaBlack, kdBlack, true, true );
		PixelShader  = compile ps_1_4 PiecePS( pieceAlbedo, true, true, reflBlack );
	}
}


technique TBoard_EnvironmentReflections
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		VertexShader = compile vs_1_1 StandardVS( true, true );
		PixelShader  = compile ps_1_4 BoardPS( true, true );
	}
}


technique TTable_EnvironmentReflections
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		VertexShader = compile vs_1_1 StandardVS( true, true );
		PixelShader  = compile ps_1_1 TablePS( true, true );
	}
}


technique TTrim_EnvironmentReflections
{
	pass P0
	{
		AlphaBlendEnable = false;

		VertexShader = compile vs_1_1 StandardVS( true, true );
		PixelShader  = compile ps_1_4 TrimPS( true, true );
	}
}


//-----------------------------------------------------------------------------
technique TWhite_Reflections
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = true;
		SrcBlend = SrcAlpha;
		DestBlend = InvSrcAlpha;

		VertexShader = compile vs_1_1 PieceVS( kaWhite, kdWhite, false, true );
		PixelShader  = compile ps_1_1 PiecePS( pieceAlbedo, false, true, reflWhite );
	}
}


technique TBlack_Reflections
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = true;
		SrcBlend = SrcAlpha;
		DestBlend = InvSrcAlpha;

		VertexShader = compile vs_1_1 PieceVS( kaBlack, kdBlack, false, true );
		PixelShader  = compile ps_1_1 PiecePS( pieceAlbedo, false, true, reflBlack );
	}
}


technique TBoard_Reflections
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		VertexShader = compile vs_1_1 StandardVS( false, true );
		PixelShader  = compile ps_1_4 BoardPS( false, true );
	}
}


technique TTable_Reflections
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		VertexShader = compile vs_1_1 StandardVS( false, true );
		PixelShader  = compile ps_1_4 TablePS( false, true );
	}
}


technique TTrim_Reflections
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		VertexShader = compile vs_1_1 StandardVS( false, true );
		PixelShader  = compile ps_1_4 TrimPS( false, true );
	}
}


//-----------------------------------------------------------------------------
technique TWhite_Environment
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = true;
		SrcBlend = SrcAlpha;
		DestBlend = InvSrcAlpha;

		VertexShader = compile vs_1_1 PieceVS( kaWhite, kdWhite, true, false );
		PixelShader  = compile ps_1_4 PiecePS( pieceAlbedo, true, false, reflWhite );
	}
}


technique TBlack_Environment
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = true;
		SrcBlend = SrcAlpha;
		DestBlend = InvSrcAlpha;

		VertexShader = compile vs_1_1 PieceVS( kaBlack, kdBlack, true, false );
		PixelShader  = compile ps_1_4 PiecePS( pieceAlbedo, true, false, reflBlack );
	}
}


technique TBoard_Environment
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		VertexShader = compile vs_1_1 StandardVS( true, false );
		PixelShader  = compile ps_1_1 BoardPS( true, false );
	}
}


technique TTable_Environment
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		VertexShader = compile vs_1_1 StandardVS( true, false );
		PixelShader  = compile ps_1_1 TablePS( true, false );
	}
}


technique TTrim_Environment
{
	pass P0
	{
        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		VertexShader = compile vs_1_1 StandardVS( true, false );
		PixelShader  = compile ps_1_1 TrimPS( true, false );
	}
}


//-----------------------------------------------------------------------------
technique TWhite
{
	pass P0
	{
		WorldTransform[0] = (World);
		ViewTransform = (View);
		ProjectionTransform = (Projection);

		Lighting = true;
		LightEnable[0] = true;
		LightType[0] = Directional;
		LightDirection[0] = (-worldLight);
		LightAmbient[0] = float4( 0, 0, 0, 0 );
		LightDiffuse[0] = float4( 1, 1, 1, 1 );
		LightSpecular[0] = float4( 1, 1, 1, 1 );
		LightEnable[1] = false;

		Ambient = float4( 1, 1, 1, 1 );
		SpecularEnable = true;

		MaterialAmbient = float4( kaWhite, 1 );
		MaterialDiffuse = float4( kdWhite, 1 );
		MaterialSpecular = float4( 0.15, 0.15, 0.15, 1 );
		MaterialPower = 20.0;
		MaterialEmissive = float4( 0, 0, 0, 0 );

//		AmbientMaterialSource = Material;
//		DiffuseMaterialSource = Material;
//		EmissiveMaterialSource = Material;
//		SpecularMaterialSource = Material;

        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = true;
		SrcBlend = SrcAlpha;
		DestBlend = InvSrcAlpha;

		Sampler[0] = (AlbedoSampler);

		TextureFactor = (Alpha.xxxx);

		ColorOp[0] = COLOROP0;
		ColorArg1[0] = Texture;
		ColorArg2[0] = Current;
		ColorOp[1] = Disable;

		AlphaOp[0] = SelectArg1;
		AlphaArg1[0] = TFactor;
		AlphaArg2[0] = Current;
		AlphaOp[1] = Disable;

		VertexShader = null;
		PixelShader  = null;
	}
}


technique TBlack
{
	pass P0
	{
		WorldTransform[0] = (World);
		ViewTransform = (View);
		ProjectionTransform = (Projection);

		Lighting = true;
		LightEnable[0] = true;
		LightType[0] = Directional;
		LightDirection[0] = (-worldLight);
		LightAmbient[0] = float4( 0, 0, 0, 0 );
		LightDiffuse[0] = float4( 1, 1, 1, 1 );
		LightSpecular[0] = float4( 1, 1, 1, 1 );
		LightEnable[1] = false;

		Ambient = float4( 1, 1, 1, 1 );
		SpecularEnable = true;

		MaterialAmbient = float4( kaBlack, 1 );
		MaterialDiffuse = float4( kdBlack, 1 );
		MaterialSpecular = float4( 0.25, 0.25, 0.25, 1 );
		MaterialPower = 20.0;
		MaterialEmissive = float4( 0, 0, 0, 0 );

//		AmbientMaterialSource = Material;
//		DiffuseMaterialSource = Material;
//		EmissiveMaterialSource = Material;
//		SpecularMaterialSource = Material;

        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = true;
		SrcBlend = SrcAlpha;
		DestBlend = InvSrcAlpha;

		Sampler[0] = (AlbedoSampler);

		TextureFactor = (Alpha.xxxx);

		ColorOp[0] = COLOROP0;
		ColorArg1[0] = Texture;
		ColorArg2[0] = Current;
		ColorOp[1] = Disable;

		AlphaOp[0] = SelectArg1;
		AlphaArg1[0] = TFactor;
		AlphaArg2[0] = Current;
		AlphaOp[1] = Disable;

		VertexShader = null;
		PixelShader  = null;
	}
}


technique TBoard
{
	pass P0
	{
		WorldTransform[0] = (World);
		ViewTransform = (View);
		ProjectionTransform = (Projection);

        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		Sampler[0] = (AlbedoSampler);

		ColorOp[0] = SelectArg1;
		ColorArg1[0] = Texture;
		ColorArg2[0] = Current;
		ColorOp[1] = Disable;

		AlphaOp[0] = Disable;
		AlphaOp[1] = Disable;

		VertexShader = null;
		PixelShader  = null;
	}
}


technique TTable
{
	pass P0
	{
		WorldTransform[0] = (World);
		ViewTransform = (View);
		ProjectionTransform = (Projection);

        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		Sampler[0] = (AlbedoSampler);

		ColorOp[0] = SelectArg1;
		ColorArg1[0] = Texture;
		ColorArg2[0] = Current;
		ColorOp[1] = Disable;

		AlphaOp[0] = Disable;
		AlphaOp[1] = Disable;

		VertexShader = null;
		PixelShader  = null;
	}
}


technique TTrim
{
	pass P0
	{
		WorldTransform[0] = (World);
		ViewTransform = (View);
		ProjectionTransform = (Projection);

        ZEnable = true;
        ZFunc = LessEqual;
        ZWriteEnable = true;

		AlphaBlendEnable = false;

		TextureFactor = (trimColor.xyzz);

		ColorOp[0] = SelectArg1;
		ColorArg1[0] = TFactor;
		ColorArg2[0] = Current;
		ColorOp[1] = Disable;

		AlphaOp[0] = Disable;
		AlphaOp[1] = Disable;

		VertexShader = null;
		PixelShader  = null;
	}
}


float3 kaWhite = float3( 0.260, 0.260, 0.290 );
float3 kdWhite = float3( 0.820, 0.820, 0.850 );
float reflWhite = 0.33;

float3 kaBlack = float3( 0.200, 0.200, 0.200 );
float3 kdBlack = float3( 0.450, 0.450, 0.450 );
float reflBlack = 0.14;

float environmentTextureAmount = 0.6;

float3 worldLight = float3( 0.259, 0.966, 0 ); // 15 degrees over
float3 trimColor = float3( 0.600, 0.580, 0.500 );


bool pieceAlbedo = true;
#define COLOROP0 Modulate


#include "Media\Shaders\MeshCommon.fx"
float3 kaWhite = float3( 0.317, 0.317, 0.317 );
float3 kdWhite = float3( 0.651, 0.651, 0.651 );
float reflWhite = 0.08;

float3 kaBlack = float3( 0.035, 0.045, 0.055 );
float3 kdBlack = float3( 0.165, 0.165, 0.165 );
float reflBlack = 0.17;

float environmentTextureAmount = 1.0;

float3 worldLight = float3( 0.259, 0.966, 0 ); // 15 degrees over
float3 trimColor = float3( 0.600, 0.580, 0.500 );


bool pieceAlbedo = false;
#define COLOROP0 SelectArg2


#include "Media\Shaders\MeshCommon.fx"
float3 kaWhite = float3( 0.317, 0.317, 0.317 );
float3 kdWhite = float3( 0.800, 0.800, 0.800 );
float reflWhite = 0.10;

float3 kaBlack = float3( 0.320, 0.250, 0.220 );
float3 kdBlack = float3( 1.000, 1.000, 1.000 );
float reflBlack = 0.14;

float environmentTextureAmount = 1.0;

float3 worldLight = float3( 0.259, 0.966, 0 ); // 15 degrees over
float3 trimColor = float3( 0.600, 0.580, 0.500 );


bool pieceAlbedo = true;
#define COLOROP0 Modulate


#include "Media\Shaders\MeshCommon.fx"
float4x4 WorldViewProjInv;
texture SkyBoxTexture;


samplerCUBE SkyBoxSampler = sampler_state
{
	Texture   = (SkyBoxTexture);
	MinFilter = Linear;
	MagFilter = Linear;
	MipFilter = Linear;
};


struct VS_OUTPUT
{
	float4 Position		: POSITION;
	float3 TexCoord		: TEXCOORD0;
};


VS_OUTPUT SkyBoxVS( float4 Pos : POSITION )
{
	VS_OUTPUT Output;

	Output.Position = Pos;
	Output.TexCoord = normalize( mul( Pos, WorldViewProjInv ) );

	return Output;
}


float4 SkyBoxPS( VS_OUTPUT Input ) : COLOR
{
	float3 c = texCUBE( SkyBoxSampler, Input.TexCoord );
	return float4( c, 1 );
}


technique TSkyBox
{
	pass P0
	{
        ZEnable = false;
		AlphaBlendEnable = false;

		VertexShader = compile vs_1_1 SkyBoxVS();
		PixelShader = compile ps_1_1 SkyBoxPS();
	}
}

Unused Textures

Hmmm...
To do:
See if there's more to find.

There are some unused textures in the game files.

Environments

These images were likely intended to be backgrounds before being replaced with simple gradients.

DXUT Controls

An unused texture for likely a development menu.