added licensing information to tools files
added a shader folder for the stock shaders started the StockShaderCodeGenerator tool added a tools solution file added a bin folder in tools folder for precompiled tools and changed tools project files removed StockEffects content project from solution and added the effect files to the shader folder for reference
This commit is contained in:
parent
91a7451f97
commit
40c951e02b
@ -11,8 +11,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter",
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.ContentPipeline", "ANX.Framework.ContentPipeline\ANX.Framework.ContentPipeline.csproj", "{ECBF60CB-1CF0-4F92-8963-E73115B04B43}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StockEffects", "StockEffects\StockEffects.contentproj", "{B250043B-C41D-4E56-A477-0664D2E47054}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.RenderSystem.Windows.DX11.1", "ANX.RenderSystem.Windows.DX11.1\ANX.RenderSystem.Windows.DX11.1.csproj", "{B30DE9C2-0926-46B6-8351-9AF276C472D5}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{B24A8593-562A-4A25-BB08-46C163F10F3F}"
|
||||
@ -49,6 +47,35 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputSystem.Windows.Kin
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kinect", "Samples\Kinect\Kinect.csproj", "{A42413A9-5189-40CB-AACA-D50F24865431}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Stock Shaders", "Stock Shaders", "{60824BDB-AC8A-42ED-9B79-111FB44669FF}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DX10", "DX10", "{CCB4679D-11AF-4EC6-AAA4-36619FCE70FA}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
shader\DX10\build.xml = shader\DX10\build.xml
|
||||
shader\DX10\SpriteBatch.fx = shader\DX10\SpriteBatch.fx
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GL3", "GL3", "{E4FFD875-95FC-48F2-8B6D-8483D0B71666}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
shader\GL3\build.xml = shader\GL3\build.xml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StockShaderCodeGenerator", "Tools\StockShaderCodeGenerator\StockShaderCodeGenerator.csproj", "{D73E5FF4-AE88-4637-8159-120FBDA564BF}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XNA", "XNA", "{BD648BB8-EF28-453C-B4F5-EE3C93EB4DAF}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
shader\XNA\AlphaTestEffect.fx = shader\XNA\AlphaTestEffect.fx
|
||||
shader\XNA\BasicEffect.fx = shader\XNA\BasicEffect.fx
|
||||
shader\XNA\Common.fxh = shader\XNA\Common.fxh
|
||||
shader\XNA\DualTextureEffect.fx = shader\XNA\DualTextureEffect.fx
|
||||
shader\XNA\EnvironmentMapEffect.fx = shader\XNA\EnvironmentMapEffect.fx
|
||||
shader\XNA\Lighting.fxh = shader\XNA\Lighting.fxh
|
||||
shader\XNA\Macros.fxh = shader\XNA\Macros.fxh
|
||||
shader\XNA\SkinnedEffect.fx = shader\XNA\SkinnedEffect.fx
|
||||
shader\XNA\SpriteEffect.fx = shader\XNA\SpriteEffect.fx
|
||||
shader\XNA\Structures.fxh = shader\XNA\Structures.fxh
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SubversionScc) = preSolution
|
||||
Svn-Managed = True
|
||||
@ -115,12 +142,6 @@ Global
|
||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.ActiveCfg = Release|x86
|
||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.Build.0 = Release|x86
|
||||
{B250043B-C41D-4E56-A477-0664D2E47054}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B250043B-C41D-4E56-A477-0664D2E47054}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{B250043B-C41D-4E56-A477-0664D2E47054}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B250043B-C41D-4E56-A477-0664D2E47054}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B250043B-C41D-4E56-A477-0664D2E47054}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{B250043B-C41D-4E56-A477-0664D2E47054}.Release|x86.ActiveCfg = Debug|Any CPU
|
||||
{B30DE9C2-0926-46B6-8351-9AF276C472D5}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{B30DE9C2-0926-46B6-8351-9AF276C472D5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{B30DE9C2-0926-46B6-8351-9AF276C472D5}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
@ -247,6 +268,16 @@ Global
|
||||
{A42413A9-5189-40CB-AACA-D50F24865431}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{A42413A9-5189-40CB-AACA-D50F24865431}.Release|x86.ActiveCfg = Release|x86
|
||||
{A42413A9-5189-40CB-AACA-D50F24865431}.Release|x86.Build.0 = Release|x86
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF}.Debug|x86.Build.0 = Debug|x86
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF}.Release|x86.ActiveCfg = Release|x86
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -257,6 +288,7 @@ Global
|
||||
{5BE49183-2F6F-4527-AC90-D816911FCF90} = {D421509A-9AE3-4D7E-881B-EAFED598B028}
|
||||
{9D8DC781-2E0D-4348-BAD9-745F91428A3F} = {B24A8593-562A-4A25-BB08-46C163F10F3F}
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C} = {B24A8593-562A-4A25-BB08-46C163F10F3F}
|
||||
{D73E5FF4-AE88-4637-8159-120FBDA564BF} = {B24A8593-562A-4A25-BB08-46C163F10F3F}
|
||||
{F945515B-394D-4ED4-80E0-98EB59B69D24} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
{AAA20E99-A897-4C91-A23E-D02B8F08ACA5} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
{BC79B021-10E4-4D01-945A-7048FFF53A22} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
@ -267,5 +299,8 @@ Global
|
||||
{60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
|
||||
{E5D69E75-D77C-493F-BBDA-6F9E73B82549} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
|
||||
{6A582788-C4D2-410C-96CD-177F75712D65} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9}
|
||||
{CCB4679D-11AF-4EC6-AAA4-36619FCE70FA} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
||||
{E4FFD875-95FC-48F2-8B6D-8483D0B71666} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
||||
{BD648BB8-EF28-453C-B4F5-EE3C93EB4DAF} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -41,7 +41,7 @@
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
uniform extern float4x4 MatrixTransform;
|
||||
uniform mat4 MatrixTransform;
|
||||
|
||||
Texture2D<float4> Texture : register(t0);
|
||||
sampler TextureSampler : register(s0);
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ANXStatusComparer</RootNamespace>
|
||||
<AssemblyName>ANXStatusComparer</AssemblyName>
|
||||
<AssemblyName>asc</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
@ -19,7 +19,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@ -28,7 +28,7 @@
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -2,6 +2,53 @@
|
||||
using System.Collections.Generic;
|
||||
using ANXStatusComparer.Data;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -1,5 +1,52 @@
|
||||
using System;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -4,6 +4,53 @@ using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Xml.Linq;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -1,7 +1,57 @@
|
||||
using System;
|
||||
#region Private Members
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Data
|
||||
{
|
||||
public class BaseObject
|
||||
|
@ -1,5 +1,52 @@
|
||||
using System;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Data
|
||||
{
|
||||
public abstract class BaseObjectElement
|
||||
|
@ -2,6 +2,53 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Data
|
||||
{
|
||||
public class ConstructorElement : BaseObjectElement
|
||||
|
@ -1,6 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Data
|
||||
{
|
||||
public class EnumData
|
||||
|
@ -2,6 +2,53 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Data
|
||||
{
|
||||
public class EventElement : BaseObjectElement
|
||||
|
@ -2,6 +2,53 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Data
|
||||
{
|
||||
public class FieldElement : BaseObjectElement
|
||||
|
@ -2,6 +2,53 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Data
|
||||
{
|
||||
public class MethodElement : BaseObjectElement
|
||||
|
@ -1,6 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Data
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -2,6 +2,53 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Data
|
||||
{
|
||||
public class PropertyElement : BaseObjectElement
|
||||
|
@ -3,6 +3,53 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using ANXStatusComparer.Data;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Output
|
||||
{
|
||||
public static class HtmlOutput
|
||||
|
@ -2,6 +2,53 @@
|
||||
using ANXStatusComparer.Data;
|
||||
using System.Collections.Generic;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer.Output
|
||||
{
|
||||
public static class TextOutput
|
||||
|
@ -4,6 +4,53 @@ using System.IO;
|
||||
using ANXStatusComparer.Data;
|
||||
using ANXStatusComparer.Output;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer
|
||||
{
|
||||
public static class Program
|
||||
|
@ -2,6 +2,53 @@
|
||||
using System.Collections.Generic;
|
||||
using ANXStatusComparer.Data;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANXStatusComparer
|
||||
{
|
||||
/// <summary>
|
||||
|
66
Tools/StockShaderCodeGenerator/Program.cs
Normal file
66
Tools/StockShaderCodeGenerator/Program.cs
Normal file
@ -0,0 +1,66 @@
|
||||
#region Private Members
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace StockShaderCodeGenerator
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine(System.IO.Path.GetFullPath("/"));
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
36
Tools/StockShaderCodeGenerator/Properties/AssemblyInfo.cs
Normal file
36
Tools/StockShaderCodeGenerator/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die mit einer Assembly verknüpft sind.
|
||||
[assembly: AssemblyTitle("StockShaderCodeGenerator")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("ANX Developer Team")]
|
||||
[assembly: AssemblyProduct("StockShaderCodeGenerator")]
|
||||
[assembly: AssemblyCopyright("Copyright © ANX Developer Team 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
|
||||
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("f53af380-99cd-4735-b6fd-d199b3586e8a")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
// übernehmen, indem Sie "*" eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{D73E5FF4-AE88-4637-8159-120FBDA564BF}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>StockShaderCodeGenerator</RootNamespace>
|
||||
<AssemblyName>sscg</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@ -4,6 +4,53 @@ using System.Drawing.Drawing2D;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace XNAToANXConverter
|
||||
{
|
||||
public partial class ConverterForm : Form
|
||||
|
@ -2,6 +2,53 @@
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace XNAToANXConverter
|
||||
{
|
||||
static class Program
|
||||
|
@ -2,6 +2,53 @@
|
||||
using System.IO;
|
||||
using System.Xml.Linq;
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace XNAToANXConverter
|
||||
{
|
||||
public static class ProjectData
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>XNAToANXConverter</RootNamespace>
|
||||
<AssemblyName>XNAToANXConverter</AssemblyName>
|
||||
<AssemblyName>x2a</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
@ -19,7 +19,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@ -28,7 +28,7 @@
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
0
shader/DX10/SpriteBatch.fx
Normal file
0
shader/DX10/SpriteBatch.fx
Normal file
0
shader/DX10/build.xml
Normal file
0
shader/DX10/build.xml
Normal file
0
shader/GL3/build.xml
Normal file
0
shader/GL3/build.xml
Normal file
194
shader/XNA/AlphaTestEffect.fx
Normal file
194
shader/XNA/AlphaTestEffect.fx
Normal file
@ -0,0 +1,194 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// AlphaTestEffect.fx
|
||||
//
|
||||
// Microsoft XNA Community Game Platform
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "Macros.fxh"
|
||||
|
||||
|
||||
DECLARE_TEXTURE(Texture, 0);
|
||||
|
||||
|
||||
BEGIN_CONSTANTS
|
||||
|
||||
float4 DiffuseColor _vs(c0) _cb(c0);
|
||||
float4 AlphaTest _ps(c0) _cb(c1);
|
||||
float3 FogColor _ps(c1) _cb(c2);
|
||||
float4 FogVector _vs(c5) _cb(c3);
|
||||
|
||||
MATRIX_CONSTANTS
|
||||
|
||||
float4x4 WorldViewProj _vs(c1) _cb(c0);
|
||||
|
||||
END_CONSTANTS
|
||||
|
||||
|
||||
#include "Structures.fxh"
|
||||
#include "Common.fxh"
|
||||
|
||||
|
||||
// Vertex shader: basic.
|
||||
VSOutputTx VSAlphaTest(VSInputTx vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: no fog.
|
||||
VSOutputTxNoFog VSAlphaTestNoFog(VSInputTx vin)
|
||||
{
|
||||
VSOutputTxNoFog vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParamsNoFog;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex color.
|
||||
VSOutputTx VSAlphaTestVc(VSInputTxVc vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex color, no fog.
|
||||
VSOutputTxNoFog VSAlphaTestVcNoFog(VSInputTxVc vin)
|
||||
{
|
||||
VSOutputTxNoFog vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParamsNoFog;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: less/greater compare function.
|
||||
float4 PSAlphaTestLtGt(PSInputTx pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
clip((color.a < AlphaTest.x) ? AlphaTest.z : AlphaTest.w);
|
||||
|
||||
ApplyFog(color, pin.Specular.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: less/greater compare function, no fog.
|
||||
float4 PSAlphaTestLtGtNoFog(PSInputTxNoFog pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
clip((color.a < AlphaTest.x) ? AlphaTest.z : AlphaTest.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: equal/notequal compare function.
|
||||
float4 PSAlphaTestEqNe(PSInputTx pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
clip((abs(color.a - AlphaTest.x) < AlphaTest.y) ? AlphaTest.z : AlphaTest.w);
|
||||
|
||||
ApplyFog(color, pin.Specular.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: equal/notequal compare function, no fog.
|
||||
float4 PSAlphaTestEqNeNoFog(PSInputTxNoFog pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
clip((abs(color.a - AlphaTest.x) < AlphaTest.y) ? AlphaTest.z : AlphaTest.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
VertexShader VSArray[4] =
|
||||
{
|
||||
compile vs_2_0 VSAlphaTest(),
|
||||
compile vs_2_0 VSAlphaTestNoFog(),
|
||||
compile vs_2_0 VSAlphaTestVc(),
|
||||
compile vs_2_0 VSAlphaTestVcNoFog(),
|
||||
};
|
||||
|
||||
|
||||
int VSIndices[8] =
|
||||
{
|
||||
0, // lt/gt
|
||||
1, // lt/gt, no fog
|
||||
2, // lt/gt, vertex color
|
||||
3, // lt/gt, vertex color, no fog
|
||||
|
||||
0, // eq/ne
|
||||
1, // eq/ne, no fog
|
||||
2, // eq/ne, vertex color
|
||||
3, // eq/ne, vertex color, no fog
|
||||
};
|
||||
|
||||
|
||||
PixelShader PSArray[4] =
|
||||
{
|
||||
compile ps_2_0 PSAlphaTestLtGt(),
|
||||
compile ps_2_0 PSAlphaTestLtGtNoFog(),
|
||||
compile ps_2_0 PSAlphaTestEqNe(),
|
||||
compile ps_2_0 PSAlphaTestEqNeNoFog(),
|
||||
};
|
||||
|
||||
|
||||
int PSIndices[8] =
|
||||
{
|
||||
0, // lt/gt
|
||||
1, // lt/gt, no fog
|
||||
0, // lt/gt, vertex color
|
||||
1, // lt/gt, vertex color, no fog
|
||||
|
||||
2, // eq/ne
|
||||
3, // eq/ne, no fog
|
||||
2, // eq/ne, vertex color
|
||||
3, // eq/ne, vertex color, no fog
|
||||
};
|
||||
|
||||
|
||||
int ShaderIndex = 0;
|
||||
|
||||
|
||||
Technique AlphaTestEffect
|
||||
{
|
||||
Pass
|
||||
{
|
||||
VertexShader = (VSArray[VSIndices[ShaderIndex]]);
|
||||
PixelShader = (PSArray[PSIndices[ShaderIndex]]);
|
||||
}
|
||||
}
|
588
shader/XNA/BasicEffect.fx
Normal file
588
shader/XNA/BasicEffect.fx
Normal file
@ -0,0 +1,588 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// BasicEffect.fx
|
||||
//
|
||||
// Microsoft XNA Community Game Platform
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "Macros.fxh"
|
||||
|
||||
|
||||
DECLARE_TEXTURE(Texture, 0);
|
||||
|
||||
|
||||
BEGIN_CONSTANTS
|
||||
|
||||
float4 DiffuseColor _vs(c0) _ps(c1) _cb(c0);
|
||||
float3 EmissiveColor _vs(c1) _ps(c2) _cb(c1);
|
||||
float3 SpecularColor _vs(c2) _ps(c3) _cb(c2);
|
||||
float SpecularPower _vs(c3) _ps(c4) _cb(c2.w);
|
||||
|
||||
float3 DirLight0Direction _vs(c4) _ps(c5) _cb(c3);
|
||||
float3 DirLight0DiffuseColor _vs(c5) _ps(c6) _cb(c4);
|
||||
float3 DirLight0SpecularColor _vs(c6) _ps(c7) _cb(c5);
|
||||
|
||||
float3 DirLight1Direction _vs(c7) _ps(c8) _cb(c6);
|
||||
float3 DirLight1DiffuseColor _vs(c8) _ps(c9) _cb(c7);
|
||||
float3 DirLight1SpecularColor _vs(c9) _ps(c10) _cb(c8);
|
||||
|
||||
float3 DirLight2Direction _vs(c10) _ps(c11) _cb(c9);
|
||||
float3 DirLight2DiffuseColor _vs(c11) _ps(c12) _cb(c10);
|
||||
float3 DirLight2SpecularColor _vs(c12) _ps(c13) _cb(c11);
|
||||
|
||||
float3 EyePosition _vs(c13) _ps(c14) _cb(c12);
|
||||
|
||||
float3 FogColor _ps(c0) _cb(c13);
|
||||
float4 FogVector _vs(c14) _cb(c14);
|
||||
|
||||
float4x4 World _vs(c19) _cb(c15);
|
||||
float3x3 WorldInverseTranspose _vs(c23) _cb(c19);
|
||||
|
||||
MATRIX_CONSTANTS
|
||||
|
||||
float4x4 WorldViewProj _vs(c15) _cb(c0);
|
||||
|
||||
END_CONSTANTS
|
||||
|
||||
|
||||
#include "Structures.fxh"
|
||||
#include "Common.fxh"
|
||||
#include "Lighting.fxh"
|
||||
|
||||
|
||||
// Vertex shader: basic.
|
||||
VSOutput VSBasic(VSInput vin)
|
||||
{
|
||||
VSOutput vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: no fog.
|
||||
VSOutputNoFog VSBasicNoFog(VSInput vin)
|
||||
{
|
||||
VSOutputNoFog vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParamsNoFog;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex color.
|
||||
VSOutput VSBasicVc(VSInputVc vin)
|
||||
{
|
||||
VSOutput vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex color, no fog.
|
||||
VSOutputNoFog VSBasicVcNoFog(VSInputVc vin)
|
||||
{
|
||||
VSOutputNoFog vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParamsNoFog;
|
||||
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: texture.
|
||||
VSOutputTx VSBasicTx(VSInputTx vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: texture, no fog.
|
||||
VSOutputTxNoFog VSBasicTxNoFog(VSInputTx vin)
|
||||
{
|
||||
VSOutputTxNoFog vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParamsNoFog;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: texture + vertex color.
|
||||
VSOutputTx VSBasicTxVc(VSInputTxVc vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: texture + vertex color, no fog.
|
||||
VSOutputTxNoFog VSBasicTxVcNoFog(VSInputTxVc vin)
|
||||
{
|
||||
VSOutputTxNoFog vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParamsNoFog;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex lighting.
|
||||
VSOutput VSBasicVertexLighting(VSInputNm vin)
|
||||
{
|
||||
VSOutput vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 3);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex lighting + vertex color.
|
||||
VSOutput VSBasicVertexLightingVc(VSInputNmVc vin)
|
||||
{
|
||||
VSOutput vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 3);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex lighting + texture.
|
||||
VSOutputTx VSBasicVertexLightingTx(VSInputNmTx vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 3);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex lighting + texture + vertex color.
|
||||
VSOutputTx VSBasicVertexLightingTxVc(VSInputNmTxVc vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 3);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: one light.
|
||||
VSOutput VSBasicOneLight(VSInputNm vin)
|
||||
{
|
||||
VSOutput vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 1);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: one light + vertex color.
|
||||
VSOutput VSBasicOneLightVc(VSInputNmVc vin)
|
||||
{
|
||||
VSOutput vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 1);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: one light + texture.
|
||||
VSOutputTx VSBasicOneLightTx(VSInputNmTx vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 1);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: one light + texture + vertex color.
|
||||
VSOutputTx VSBasicOneLightTxVc(VSInputNmTxVc vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 1);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: pixel lighting.
|
||||
VSOutputPixelLighting VSBasicPixelLighting(VSInputNm vin)
|
||||
{
|
||||
VSOutputPixelLighting vout;
|
||||
|
||||
CommonVSOutputPixelLighting cout = ComputeCommonVSOutputPixelLighting(vin.Position, vin.Normal);
|
||||
SetCommonVSOutputParamsPixelLighting;
|
||||
|
||||
vout.Diffuse = float4(1, 1, 1, DiffuseColor.a);
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: pixel lighting + vertex color.
|
||||
VSOutputPixelLighting VSBasicPixelLightingVc(VSInputNmVc vin)
|
||||
{
|
||||
VSOutputPixelLighting vout;
|
||||
|
||||
CommonVSOutputPixelLighting cout = ComputeCommonVSOutputPixelLighting(vin.Position, vin.Normal);
|
||||
SetCommonVSOutputParamsPixelLighting;
|
||||
|
||||
vout.Diffuse.rgb = vin.Color.rgb;
|
||||
vout.Diffuse.a = vin.Color.a * DiffuseColor.a;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: pixel lighting + texture.
|
||||
VSOutputPixelLightingTx VSBasicPixelLightingTx(VSInputNmTx vin)
|
||||
{
|
||||
VSOutputPixelLightingTx vout;
|
||||
|
||||
CommonVSOutputPixelLighting cout = ComputeCommonVSOutputPixelLighting(vin.Position, vin.Normal);
|
||||
SetCommonVSOutputParamsPixelLighting;
|
||||
|
||||
vout.Diffuse = float4(1, 1, 1, DiffuseColor.a);
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: pixel lighting + texture + vertex color.
|
||||
VSOutputPixelLightingTx VSBasicPixelLightingTxVc(VSInputNmTxVc vin)
|
||||
{
|
||||
VSOutputPixelLightingTx vout;
|
||||
|
||||
CommonVSOutputPixelLighting cout = ComputeCommonVSOutputPixelLighting(vin.Position, vin.Normal);
|
||||
SetCommonVSOutputParamsPixelLighting;
|
||||
|
||||
vout.Diffuse.rgb = vin.Color.rgb;
|
||||
vout.Diffuse.a = vin.Color.a * DiffuseColor.a;
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: basic.
|
||||
float4 PSBasic(PSInput pin) : SV_Target0
|
||||
{
|
||||
float4 color = pin.Diffuse;
|
||||
|
||||
ApplyFog(color, pin.Specular.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: no fog.
|
||||
float4 PSBasicNoFog(PSInputNoFog pin) : SV_Target0
|
||||
{
|
||||
return pin.Diffuse;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: texture.
|
||||
float4 PSBasicTx(PSInputTx pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
ApplyFog(color, pin.Specular.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: texture, no fog.
|
||||
float4 PSBasicTxNoFog(PSInputTxNoFog pin) : SV_Target0
|
||||
{
|
||||
return SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: vertex lighting.
|
||||
float4 PSBasicVertexLighting(PSInput pin) : SV_Target0
|
||||
{
|
||||
float4 color = pin.Diffuse;
|
||||
|
||||
AddSpecular(color, pin.Specular.rgb);
|
||||
ApplyFog(color, pin.Specular.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: vertex lighting, no fog.
|
||||
float4 PSBasicVertexLightingNoFog(PSInput pin) : SV_Target0
|
||||
{
|
||||
float4 color = pin.Diffuse;
|
||||
|
||||
AddSpecular(color, pin.Specular.rgb);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: vertex lighting + texture.
|
||||
float4 PSBasicVertexLightingTx(PSInputTx pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
AddSpecular(color, pin.Specular.rgb);
|
||||
ApplyFog(color, pin.Specular.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: vertex lighting + texture, no fog.
|
||||
float4 PSBasicVertexLightingTxNoFog(PSInputTx pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
AddSpecular(color, pin.Specular.rgb);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: pixel lighting.
|
||||
float4 PSBasicPixelLighting(PSInputPixelLighting pin) : SV_Target0
|
||||
{
|
||||
float4 color = pin.Diffuse;
|
||||
|
||||
float3 eyeVector = normalize(EyePosition - pin.PositionWS.xyz);
|
||||
float3 worldNormal = normalize(pin.NormalWS);
|
||||
|
||||
ColorPair lightResult = ComputeLights(eyeVector, worldNormal, 3);
|
||||
|
||||
color.rgb *= lightResult.Diffuse;
|
||||
|
||||
AddSpecular(color, lightResult.Specular);
|
||||
ApplyFog(color, pin.PositionWS.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: pixel lighting + texture.
|
||||
float4 PSBasicPixelLightingTx(PSInputPixelLightingTx pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
float3 eyeVector = normalize(EyePosition - pin.PositionWS.xyz);
|
||||
float3 worldNormal = normalize(pin.NormalWS);
|
||||
|
||||
ColorPair lightResult = ComputeLights(eyeVector, worldNormal, 3);
|
||||
|
||||
color.rgb *= lightResult.Diffuse;
|
||||
|
||||
AddSpecular(color, lightResult.Specular);
|
||||
ApplyFog(color, pin.PositionWS.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
VertexShader VSArray[20] =
|
||||
{
|
||||
compile vs_2_0 VSBasic(),
|
||||
compile vs_2_0 VSBasicNoFog(),
|
||||
compile vs_2_0 VSBasicVc(),
|
||||
compile vs_2_0 VSBasicVcNoFog(),
|
||||
compile vs_2_0 VSBasicTx(),
|
||||
compile vs_2_0 VSBasicTxNoFog(),
|
||||
compile vs_2_0 VSBasicTxVc(),
|
||||
compile vs_2_0 VSBasicTxVcNoFog(),
|
||||
|
||||
compile vs_2_0 VSBasicVertexLighting(),
|
||||
compile vs_2_0 VSBasicVertexLightingVc(),
|
||||
compile vs_2_0 VSBasicVertexLightingTx(),
|
||||
compile vs_2_0 VSBasicVertexLightingTxVc(),
|
||||
|
||||
compile vs_2_0 VSBasicOneLight(),
|
||||
compile vs_2_0 VSBasicOneLightVc(),
|
||||
compile vs_2_0 VSBasicOneLightTx(),
|
||||
compile vs_2_0 VSBasicOneLightTxVc(),
|
||||
|
||||
compile vs_2_0 VSBasicPixelLighting(),
|
||||
compile vs_2_0 VSBasicPixelLightingVc(),
|
||||
compile vs_2_0 VSBasicPixelLightingTx(),
|
||||
compile vs_2_0 VSBasicPixelLightingTxVc(),
|
||||
};
|
||||
|
||||
|
||||
int VSIndices[32] =
|
||||
{
|
||||
0, // basic
|
||||
1, // no fog
|
||||
2, // vertex color
|
||||
3, // vertex color, no fog
|
||||
4, // texture
|
||||
5, // texture, no fog
|
||||
6, // texture + vertex color
|
||||
7, // texture + vertex color, no fog
|
||||
|
||||
8, // vertex lighting
|
||||
8, // vertex lighting, no fog
|
||||
9, // vertex lighting + vertex color
|
||||
9, // vertex lighting + vertex color, no fog
|
||||
10, // vertex lighting + texture
|
||||
10, // vertex lighting + texture, no fog
|
||||
11, // vertex lighting + texture + vertex color
|
||||
11, // vertex lighting + texture + vertex color, no fog
|
||||
|
||||
12, // one light
|
||||
12, // one light, no fog
|
||||
13, // one light + vertex color
|
||||
13, // one light + vertex color, no fog
|
||||
14, // one light + texture
|
||||
14, // one light + texture, no fog
|
||||
15, // one light + texture + vertex color
|
||||
15, // one light + texture + vertex color, no fog
|
||||
|
||||
16, // pixel lighting
|
||||
16, // pixel lighting, no fog
|
||||
17, // pixel lighting + vertex color
|
||||
17, // pixel lighting + vertex color, no fog
|
||||
18, // pixel lighting + texture
|
||||
18, // pixel lighting + texture, no fog
|
||||
19, // pixel lighting + texture + vertex color
|
||||
19, // pixel lighting + texture + vertex color, no fog
|
||||
};
|
||||
|
||||
|
||||
PixelShader PSArray[10] =
|
||||
{
|
||||
compile ps_2_0 PSBasic(),
|
||||
compile ps_2_0 PSBasicNoFog(),
|
||||
compile ps_2_0 PSBasicTx(),
|
||||
compile ps_2_0 PSBasicTxNoFog(),
|
||||
|
||||
compile ps_2_0 PSBasicVertexLighting(),
|
||||
compile ps_2_0 PSBasicVertexLightingNoFog(),
|
||||
compile ps_2_0 PSBasicVertexLightingTx(),
|
||||
compile ps_2_0 PSBasicVertexLightingTxNoFog(),
|
||||
|
||||
compile ps_2_0 PSBasicPixelLighting(),
|
||||
compile ps_2_0 PSBasicPixelLightingTx(),
|
||||
};
|
||||
|
||||
|
||||
int PSIndices[32] =
|
||||
{
|
||||
0, // basic
|
||||
1, // no fog
|
||||
0, // vertex color
|
||||
1, // vertex color, no fog
|
||||
2, // texture
|
||||
3, // texture, no fog
|
||||
2, // texture + vertex color
|
||||
3, // texture + vertex color, no fog
|
||||
|
||||
4, // vertex lighting
|
||||
5, // vertex lighting, no fog
|
||||
4, // vertex lighting + vertex color
|
||||
5, // vertex lighting + vertex color, no fog
|
||||
6, // vertex lighting + texture
|
||||
7, // vertex lighting + texture, no fog
|
||||
6, // vertex lighting + texture + vertex color
|
||||
7, // vertex lighting + texture + vertex color, no fog
|
||||
|
||||
4, // one light
|
||||
5, // one light, no fog
|
||||
4, // one light + vertex color
|
||||
5, // one light + vertex color, no fog
|
||||
6, // one light + texture
|
||||
7, // one light + texture, no fog
|
||||
6, // one light + texture + vertex color
|
||||
7, // one light + texture + vertex color, no fog
|
||||
|
||||
8, // pixel lighting
|
||||
8, // pixel lighting, no fog
|
||||
8, // pixel lighting + vertex color
|
||||
8, // pixel lighting + vertex color, no fog
|
||||
9, // pixel lighting + texture
|
||||
9, // pixel lighting + texture, no fog
|
||||
9, // pixel lighting + texture + vertex color
|
||||
9, // pixel lighting + texture + vertex color, no fog
|
||||
};
|
||||
|
||||
|
||||
int ShaderIndex = 0;
|
||||
|
||||
|
||||
Technique BasicEffect
|
||||
{
|
||||
Pass
|
||||
{
|
||||
VertexShader = (VSArray[VSIndices[ShaderIndex]]);
|
||||
PixelShader = (PSArray[PSIndices[ShaderIndex]]);
|
||||
}
|
||||
}
|
58
shader/XNA/Common.fxh
Normal file
58
shader/XNA/Common.fxh
Normal file
@ -0,0 +1,58 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Common.fxh
|
||||
//
|
||||
// Microsoft XNA Community Game Platform
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
float ComputeFogFactor(float4 position)
|
||||
{
|
||||
return saturate(dot(position, FogVector));
|
||||
}
|
||||
|
||||
|
||||
void ApplyFog(inout float4 color, float fogFactor)
|
||||
{
|
||||
color.rgb = lerp(color.rgb, FogColor * color.a, fogFactor);
|
||||
}
|
||||
|
||||
|
||||
void AddSpecular(inout float4 color, float3 specular)
|
||||
{
|
||||
color.rgb += specular * color.a;
|
||||
}
|
||||
|
||||
|
||||
struct CommonVSOutput
|
||||
{
|
||||
float4 Pos_ps;
|
||||
float4 Diffuse;
|
||||
float3 Specular;
|
||||
float FogFactor;
|
||||
};
|
||||
|
||||
|
||||
CommonVSOutput ComputeCommonVSOutput(float4 position)
|
||||
{
|
||||
CommonVSOutput vout;
|
||||
|
||||
vout.Pos_ps = mul(position, WorldViewProj);
|
||||
vout.Diffuse = DiffuseColor;
|
||||
vout.Specular = 0;
|
||||
vout.FogFactor = ComputeFogFactor(position);
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
#define SetCommonVSOutputParams \
|
||||
vout.PositionPS = cout.Pos_ps; \
|
||||
vout.Diffuse = cout.Diffuse; \
|
||||
vout.Specular = float4(cout.Specular, cout.FogFactor);
|
||||
|
||||
|
||||
#define SetCommonVSOutputParamsNoFog \
|
||||
vout.PositionPS = cout.Pos_ps; \
|
||||
vout.Diffuse = cout.Diffuse;
|
||||
|
157
shader/XNA/DualTextureEffect.fx
Normal file
157
shader/XNA/DualTextureEffect.fx
Normal file
@ -0,0 +1,157 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// DualTextureEffect.fx
|
||||
//
|
||||
// Microsoft XNA Community Game Platform
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "Macros.fxh"
|
||||
|
||||
|
||||
DECLARE_TEXTURE(Texture, 0);
|
||||
DECLARE_TEXTURE(Texture2, 1);
|
||||
|
||||
|
||||
BEGIN_CONSTANTS
|
||||
|
||||
float4 DiffuseColor _vs(c0) _cb(c0);
|
||||
float3 FogColor _ps(c0) _cb(c1);
|
||||
float4 FogVector _vs(c5) _cb(c2);
|
||||
|
||||
MATRIX_CONSTANTS
|
||||
|
||||
float4x4 WorldViewProj _vs(c1) _cb(c0);
|
||||
|
||||
END_CONSTANTS
|
||||
|
||||
|
||||
#include "Structures.fxh"
|
||||
#include "Common.fxh"
|
||||
|
||||
|
||||
// Vertex shader: basic.
|
||||
VSOutputTx2 VSDualTexture(VSInputTx2 vin)
|
||||
{
|
||||
VSOutputTx2 vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.TexCoord2 = vin.TexCoord2;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: no fog.
|
||||
VSOutputTx2NoFog VSDualTextureNoFog(VSInputTx2 vin)
|
||||
{
|
||||
VSOutputTx2NoFog vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParamsNoFog;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.TexCoord2 = vin.TexCoord2;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex color.
|
||||
VSOutputTx2 VSDualTextureVc(VSInputTx2Vc vin)
|
||||
{
|
||||
VSOutputTx2 vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.TexCoord2 = vin.TexCoord2;
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex color, no fog.
|
||||
VSOutputTx2NoFog VSDualTextureVcNoFog(VSInputTx2Vc vin)
|
||||
{
|
||||
VSOutputTx2NoFog vout;
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutput(vin.Position);
|
||||
SetCommonVSOutputParamsNoFog;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.TexCoord2 = vin.TexCoord2;
|
||||
vout.Diffuse *= vin.Color;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: basic.
|
||||
float4 PSDualTexture(PSInputTx2 pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord);
|
||||
float4 overlay = SAMPLE_TEXTURE(Texture2, pin.TexCoord2);
|
||||
|
||||
color.rgb *= 2;
|
||||
color *= overlay * pin.Diffuse;
|
||||
|
||||
ApplyFog(color, pin.Specular.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: no fog.
|
||||
float4 PSDualTextureNoFog(PSInputTx2NoFog pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord);
|
||||
float4 overlay = SAMPLE_TEXTURE(Texture2, pin.TexCoord2);
|
||||
|
||||
color.rgb *= 2;
|
||||
color *= overlay * pin.Diffuse;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
VertexShader VSArray[4] =
|
||||
{
|
||||
compile vs_2_0 VSDualTexture(),
|
||||
compile vs_2_0 VSDualTextureNoFog(),
|
||||
compile vs_2_0 VSDualTextureVc(),
|
||||
compile vs_2_0 VSDualTextureVcNoFog(),
|
||||
};
|
||||
|
||||
|
||||
PixelShader PSArray[2] =
|
||||
{
|
||||
compile ps_2_0 PSDualTexture(),
|
||||
compile ps_2_0 PSDualTextureNoFog(),
|
||||
};
|
||||
|
||||
|
||||
int PSIndices[4] =
|
||||
{
|
||||
0, // basic
|
||||
1, // no fog
|
||||
0, // vertex color
|
||||
1, // vertex color, no fog
|
||||
};
|
||||
|
||||
|
||||
int ShaderIndex = 0;
|
||||
|
||||
|
||||
Technique DualTextureEffect
|
||||
{
|
||||
Pass
|
||||
{
|
||||
VertexShader = (VSArray[ShaderIndex]);
|
||||
PixelShader = (PSArray[PSIndices[ShaderIndex]]);
|
||||
}
|
||||
}
|
249
shader/XNA/EnvironmentMapEffect.fx
Normal file
249
shader/XNA/EnvironmentMapEffect.fx
Normal file
@ -0,0 +1,249 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// EnvironmentMapEffect.fx
|
||||
//
|
||||
// Microsoft XNA Community Game Platform
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "Macros.fxh"
|
||||
|
||||
|
||||
DECLARE_TEXTURE(Texture, 0);
|
||||
DECLARE_CUBEMAP(EnvironmentMap, 1);
|
||||
|
||||
|
||||
BEGIN_CONSTANTS
|
||||
|
||||
float3 EnvironmentMapSpecular _ps(c0) _cb(c0);
|
||||
float FresnelFactor _vs(c0) _cb(c0.w);
|
||||
float EnvironmentMapAmount _vs(c1) _cb(c2.w);
|
||||
|
||||
float4 DiffuseColor _vs(c2) _cb(c1);
|
||||
float3 EmissiveColor _vs(c3) _cb(c2);
|
||||
|
||||
float3 DirLight0Direction _vs(c4) _cb(c3);
|
||||
float3 DirLight0DiffuseColor _vs(c5) _cb(c4);
|
||||
|
||||
float3 DirLight1Direction _vs(c6) _cb(c5);
|
||||
float3 DirLight1DiffuseColor _vs(c7) _cb(c6);
|
||||
|
||||
float3 DirLight2Direction _vs(c8) _cb(c7);
|
||||
float3 DirLight2DiffuseColor _vs(c9) _cb(c8);
|
||||
|
||||
float3 EyePosition _vs(c10) _cb(c9);
|
||||
|
||||
float3 FogColor _ps(c1) _cb(c10);
|
||||
float4 FogVector _vs(c11) _cb(c11);
|
||||
|
||||
float4x4 World _vs(c16) _cb(c12);
|
||||
float3x3 WorldInverseTranspose _vs(c19) _cb(c16);
|
||||
|
||||
MATRIX_CONSTANTS
|
||||
|
||||
float4x4 WorldViewProj _vs(c12) _cb(c0);
|
||||
|
||||
END_CONSTANTS
|
||||
|
||||
|
||||
// We don't use these parameters, but Lighting.fxh won't compile without them.
|
||||
#define SpecularPower 0
|
||||
#define SpecularColor float3(0, 0, 0)
|
||||
#define DirLight0SpecularColor float3(0, 0, 0)
|
||||
#define DirLight1SpecularColor float3(0, 0, 0)
|
||||
#define DirLight2SpecularColor float3(0, 0, 0)
|
||||
|
||||
|
||||
#include "Structures.fxh"
|
||||
#include "Common.fxh"
|
||||
#include "Lighting.fxh"
|
||||
|
||||
|
||||
float ComputeFresnelFactor(float3 eyeVector, float3 worldNormal)
|
||||
{
|
||||
float viewAngle = dot(eyeVector, worldNormal);
|
||||
|
||||
return pow(max(1 - abs(viewAngle), 0), FresnelFactor) * EnvironmentMapAmount;
|
||||
}
|
||||
|
||||
|
||||
VSOutputTxEnvMap ComputeEnvMapVSOutput(VSInputNmTx vin, uniform bool useFresnel, uniform int numLights)
|
||||
{
|
||||
VSOutputTxEnvMap vout;
|
||||
|
||||
float4 pos_ws = mul(vin.Position, World);
|
||||
float3 eyeVector = normalize(EyePosition - pos_ws.xyz);
|
||||
float3 worldNormal = normalize(mul(vin.Normal, WorldInverseTranspose));
|
||||
|
||||
ColorPair lightResult = ComputeLights(eyeVector, worldNormal, numLights);
|
||||
|
||||
vout.PositionPS = mul(vin.Position, WorldViewProj);
|
||||
vout.Diffuse = float4(lightResult.Diffuse, DiffuseColor.a);
|
||||
|
||||
if (useFresnel)
|
||||
vout.Specular.rgb = ComputeFresnelFactor(eyeVector, worldNormal);
|
||||
else
|
||||
vout.Specular.rgb = EnvironmentMapAmount;
|
||||
|
||||
vout.Specular.a = ComputeFogFactor(vin.Position);
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
vout.EnvCoord = reflect(-eyeVector, worldNormal);
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: basic.
|
||||
VSOutputTxEnvMap VSEnvMap(VSInputNmTx vin)
|
||||
{
|
||||
return ComputeEnvMapVSOutput(vin, false, 3);
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: fresnel.
|
||||
VSOutputTxEnvMap VSEnvMapFresnel(VSInputNmTx vin)
|
||||
{
|
||||
return ComputeEnvMapVSOutput(vin, true, 3);
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: one light.
|
||||
VSOutputTxEnvMap VSEnvMapOneLight(VSInputNmTx vin)
|
||||
{
|
||||
return ComputeEnvMapVSOutput(vin, false, 1);
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: one light, fresnel.
|
||||
VSOutputTxEnvMap VSEnvMapOneLightFresnel(VSInputNmTx vin)
|
||||
{
|
||||
return ComputeEnvMapVSOutput(vin, true, 1);
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: basic.
|
||||
float4 PSEnvMap(PSInputTxEnvMap pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
float4 envmap = SAMPLE_CUBEMAP(EnvironmentMap, pin.EnvCoord) * color.a;
|
||||
|
||||
color.rgb = lerp(color.rgb, envmap.rgb, pin.Specular.rgb);
|
||||
|
||||
ApplyFog(color, pin.Specular.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: no fog.
|
||||
float4 PSEnvMapNoFog(PSInputTxEnvMap pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
float4 envmap = SAMPLE_CUBEMAP(EnvironmentMap, pin.EnvCoord) * color.a;
|
||||
|
||||
color.rgb = lerp(color.rgb, envmap.rgb, pin.Specular.rgb);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: specular.
|
||||
float4 PSEnvMapSpecular(PSInputTxEnvMap pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
float4 envmap = SAMPLE_CUBEMAP(EnvironmentMap, pin.EnvCoord) * color.a;
|
||||
|
||||
color.rgb = lerp(color.rgb, envmap.rgb, pin.Specular.rgb);
|
||||
color.rgb += EnvironmentMapSpecular * envmap.a;
|
||||
|
||||
ApplyFog(color, pin.Specular.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: specular, no fog.
|
||||
float4 PSEnvMapSpecularNoFog(PSInputTxEnvMap pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
float4 envmap = SAMPLE_CUBEMAP(EnvironmentMap, pin.EnvCoord) * color.a;
|
||||
|
||||
color.rgb = lerp(color.rgb, envmap.rgb, pin.Specular.rgb);
|
||||
color.rgb += EnvironmentMapSpecular * envmap.a;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
VertexShader VSArray[4] =
|
||||
{
|
||||
compile vs_2_0 VSEnvMap(),
|
||||
compile vs_2_0 VSEnvMapFresnel(),
|
||||
compile vs_2_0 VSEnvMapOneLight(),
|
||||
compile vs_2_0 VSEnvMapOneLightFresnel(),
|
||||
};
|
||||
|
||||
|
||||
int VSIndices[16] =
|
||||
{
|
||||
0, // basic
|
||||
0, // basic, no fog
|
||||
1, // fresnel
|
||||
1, // fresnel, no fog
|
||||
0, // specular
|
||||
0, // specular, no fog
|
||||
1, // fresnel + specular
|
||||
1, // fresnel + specular, no fog
|
||||
|
||||
2, // one light
|
||||
2, // one light, no fog
|
||||
3, // one light, fresnel
|
||||
3, // one light, fresnel, no fog
|
||||
2, // one light, specular
|
||||
2, // one light, specular, no fog
|
||||
3, // one light, fresnel + specular
|
||||
3, // one light, fresnel + specular, no fog
|
||||
};
|
||||
|
||||
|
||||
PixelShader PSArray[4] =
|
||||
{
|
||||
compile ps_2_0 PSEnvMap(),
|
||||
compile ps_2_0 PSEnvMapNoFog(),
|
||||
compile ps_2_0 PSEnvMapSpecular(),
|
||||
compile ps_2_0 PSEnvMapSpecularNoFog(),
|
||||
};
|
||||
|
||||
|
||||
int PSIndices[16] =
|
||||
{
|
||||
0, // basic
|
||||
1, // basic, no fog
|
||||
0, // fresnel
|
||||
1, // fresnel, no fog
|
||||
2, // specular
|
||||
3, // specular, no fog
|
||||
2, // fresnel + specular
|
||||
3, // fresnel + specular, no fog
|
||||
|
||||
0, // one light
|
||||
1, // one light, no fog
|
||||
0, // one light, fresnel
|
||||
1, // one light, fresnel, no fog
|
||||
2, // one light, specular
|
||||
3, // one light, specular, no fog
|
||||
2, // one light, fresnel + specular
|
||||
3, // one light, fresnel + specular, no fog
|
||||
};
|
||||
|
||||
|
||||
int ShaderIndex = 0;
|
||||
|
||||
|
||||
Technique EnvironmentMapEffect
|
||||
{
|
||||
Pass
|
||||
{
|
||||
VertexShader = (VSArray[VSIndices[ShaderIndex]]);
|
||||
PixelShader = (PSArray[PSIndices[ShaderIndex]]);
|
||||
}
|
||||
}
|
94
shader/XNA/Lighting.fxh
Normal file
94
shader/XNA/Lighting.fxh
Normal file
@ -0,0 +1,94 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Lighting.fxh
|
||||
//
|
||||
// Microsoft XNA Community Game Platform
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
struct ColorPair
|
||||
{
|
||||
float3 Diffuse;
|
||||
float3 Specular;
|
||||
};
|
||||
|
||||
|
||||
ColorPair ComputeLights(float3 eyeVector, float3 worldNormal, uniform int numLights)
|
||||
{
|
||||
float3x3 lightDirections = 0;
|
||||
float3x3 lightDiffuse = 0;
|
||||
float3x3 lightSpecular = 0;
|
||||
float3x3 halfVectors = 0;
|
||||
|
||||
[unroll]
|
||||
for (int i = 0; i < numLights; i++)
|
||||
{
|
||||
lightDirections[i] = float3x3(DirLight0Direction, DirLight1Direction, DirLight2Direction) [i];
|
||||
lightDiffuse[i] = float3x3(DirLight0DiffuseColor, DirLight1DiffuseColor, DirLight2DiffuseColor) [i];
|
||||
lightSpecular[i] = float3x3(DirLight0SpecularColor, DirLight1SpecularColor, DirLight2SpecularColor)[i];
|
||||
|
||||
halfVectors[i] = normalize(eyeVector - lightDirections[i]);
|
||||
}
|
||||
|
||||
float3 dotL = mul(-lightDirections, worldNormal);
|
||||
float3 dotH = mul(halfVectors, worldNormal);
|
||||
|
||||
float3 zeroL = step(0, dotL);
|
||||
|
||||
float3 diffuse = zeroL * dotL;
|
||||
float3 specular = pow(max(dotH, 0) * zeroL, SpecularPower);
|
||||
|
||||
ColorPair result;
|
||||
|
||||
result.Diffuse = mul(diffuse, lightDiffuse) * DiffuseColor.rgb + EmissiveColor;
|
||||
result.Specular = mul(specular, lightSpecular) * SpecularColor;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
CommonVSOutput ComputeCommonVSOutputWithLighting(float4 position, float3 normal, uniform int numLights)
|
||||
{
|
||||
CommonVSOutput vout;
|
||||
|
||||
float4 pos_ws = mul(position, World);
|
||||
float3 eyeVector = normalize(EyePosition - pos_ws.xyz);
|
||||
float3 worldNormal = normalize(mul(normal, WorldInverseTranspose));
|
||||
|
||||
ColorPair lightResult = ComputeLights(eyeVector, worldNormal, numLights);
|
||||
|
||||
vout.Pos_ps = mul(position, WorldViewProj);
|
||||
vout.Diffuse = float4(lightResult.Diffuse, DiffuseColor.a);
|
||||
vout.Specular = lightResult.Specular;
|
||||
vout.FogFactor = ComputeFogFactor(position);
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
struct CommonVSOutputPixelLighting
|
||||
{
|
||||
float4 Pos_ps;
|
||||
float3 Pos_ws;
|
||||
float3 Normal_ws;
|
||||
float FogFactor;
|
||||
};
|
||||
|
||||
|
||||
CommonVSOutputPixelLighting ComputeCommonVSOutputPixelLighting(float4 position, float3 normal)
|
||||
{
|
||||
CommonVSOutputPixelLighting vout;
|
||||
|
||||
vout.Pos_ps = mul(position, WorldViewProj);
|
||||
vout.Pos_ws = mul(position, World).xyz;
|
||||
vout.Normal_ws = normalize(mul(normal, WorldInverseTranspose));
|
||||
vout.FogFactor = ComputeFogFactor(position);
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
#define SetCommonVSOutputParamsPixelLighting \
|
||||
vout.PositionPS = cout.Pos_ps; \
|
||||
vout.PositionWS = float4(cout.Pos_ws, cout.FogFactor); \
|
||||
vout.NormalWS = cout.Normal_ws;
|
58
shader/XNA/Macros.fxh
Normal file
58
shader/XNA/Macros.fxh
Normal file
@ -0,0 +1,58 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Macros.fxh
|
||||
//
|
||||
// Microsoft XNA Community Game Platform
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef SM4
|
||||
|
||||
|
||||
// Macros for targetting shader model 4.0 (DX11)
|
||||
|
||||
#define BEGIN_CONSTANTS cbuffer Parameters : register(b0) {
|
||||
#define MATRIX_CONSTANTS }; cbuffer ProjectionMatrix : register(b1) {
|
||||
#define END_CONSTANTS };
|
||||
|
||||
#define _vs(r)
|
||||
#define _ps(r)
|
||||
#define _cb(r) : packoffset(r)
|
||||
|
||||
#define DECLARE_TEXTURE(Name, index) \
|
||||
Texture2D<float4> Name : register(t##index); \
|
||||
sampler Name##Sampler : register(s##index)
|
||||
|
||||
#define DECLARE_CUBEMAP(Name, index) \
|
||||
TextureCube<float4> Name : register(t##index); \
|
||||
sampler Name##Sampler : register(s##index)
|
||||
|
||||
#define SAMPLE_TEXTURE(Name, texCoord) Name.Sample(Name##Sampler, texCoord)
|
||||
#define SAMPLE_CUBEMAP(Name, texCoord) Name.Sample(Name##Sampler, texCoord)
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
// Macros for targetting shader model 2.0 (DX9)
|
||||
|
||||
#define BEGIN_CONSTANTS
|
||||
#define MATRIX_CONSTANTS
|
||||
#define END_CONSTANTS
|
||||
|
||||
#define _vs(r) : register(vs, r)
|
||||
#define _ps(r) : register(ps, r)
|
||||
#define _cb(r)
|
||||
|
||||
#define DECLARE_TEXTURE(Name, index) \
|
||||
texture2D Name; \
|
||||
sampler Name##Sampler : register(s##index) = sampler_state { Texture = (Name); };
|
||||
|
||||
#define DECLARE_CUBEMAP(Name, index) \
|
||||
textureCUBE Name; \
|
||||
sampler Name##Sampler : register(s##index) = sampler_state { Texture = (Name); };
|
||||
|
||||
#define SAMPLE_TEXTURE(Name, texCoord) tex2D(Name##Sampler, texCoord)
|
||||
#define SAMPLE_CUBEMAP(Name, texCoord) texCUBE(Name##Sampler, texCoord)
|
||||
|
||||
|
||||
#endif
|
345
shader/XNA/SkinnedEffect.fx
Normal file
345
shader/XNA/SkinnedEffect.fx
Normal file
@ -0,0 +1,345 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// SkinnedEffect.fx
|
||||
//
|
||||
// Microsoft XNA Community Game Platform
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "Macros.fxh"
|
||||
|
||||
#define SKINNED_EFFECT_MAX_BONES 72
|
||||
|
||||
|
||||
DECLARE_TEXTURE(Texture, 0);
|
||||
|
||||
|
||||
BEGIN_CONSTANTS
|
||||
|
||||
float4 DiffuseColor _vs(c0) _ps(c1) _cb(c0);
|
||||
float3 EmissiveColor _vs(c1) _ps(c2) _cb(c1);
|
||||
float3 SpecularColor _vs(c2) _ps(c3) _cb(c2);
|
||||
float SpecularPower _vs(c3) _ps(c4) _cb(c2.w);
|
||||
|
||||
float3 DirLight0Direction _vs(c4) _ps(c5) _cb(c3);
|
||||
float3 DirLight0DiffuseColor _vs(c5) _ps(c6) _cb(c4);
|
||||
float3 DirLight0SpecularColor _vs(c6) _ps(c7) _cb(c5);
|
||||
|
||||
float3 DirLight1Direction _vs(c7) _ps(c8) _cb(c6);
|
||||
float3 DirLight1DiffuseColor _vs(c8) _ps(c9) _cb(c7);
|
||||
float3 DirLight1SpecularColor _vs(c9) _ps(c10) _cb(c8);
|
||||
|
||||
float3 DirLight2Direction _vs(c10) _ps(c11) _cb(c9);
|
||||
float3 DirLight2DiffuseColor _vs(c11) _ps(c12) _cb(c10);
|
||||
float3 DirLight2SpecularColor _vs(c12) _ps(c13) _cb(c11);
|
||||
|
||||
float3 EyePosition _vs(c13) _ps(c14) _cb(c12);
|
||||
|
||||
float3 FogColor _ps(c0) _cb(c13);
|
||||
float4 FogVector _vs(c14) _cb(c14);
|
||||
|
||||
float4x4 World _vs(c19) _cb(c15);
|
||||
float3x3 WorldInverseTranspose _vs(c23) _cb(c19);
|
||||
|
||||
float4x3 Bones[SKINNED_EFFECT_MAX_BONES] _vs(c26) _cb(c22);
|
||||
|
||||
MATRIX_CONSTANTS
|
||||
|
||||
float4x4 WorldViewProj _vs(c15) _cb(c0);
|
||||
|
||||
END_CONSTANTS
|
||||
|
||||
|
||||
#include "Structures.fxh"
|
||||
#include "Common.fxh"
|
||||
#include "Lighting.fxh"
|
||||
|
||||
|
||||
void Skin(inout VSInputNmTxWeights vin, uniform int boneCount)
|
||||
{
|
||||
float4x3 skinning = 0;
|
||||
|
||||
[unroll]
|
||||
for (int i = 0; i < boneCount; i++)
|
||||
{
|
||||
skinning += Bones[vin.Indices[i]] * vin.Weights[i];
|
||||
}
|
||||
|
||||
vin.Position.xyz = mul(vin.Position, skinning);
|
||||
vin.Normal = mul(vin.Normal, (float3x3)skinning);
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex lighting, one bone.
|
||||
VSOutputTx VSSkinnedVertexLightingOneBone(VSInputNmTxWeights vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
Skin(vin, 1);
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 3);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex lighting, two bones.
|
||||
VSOutputTx VSSkinnedVertexLightingTwoBones(VSInputNmTxWeights vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
Skin(vin, 2);
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 3);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: vertex lighting, four bones.
|
||||
VSOutputTx VSSkinnedVertexLightingFourBones(VSInputNmTxWeights vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
Skin(vin, 4);
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 3);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: one light, one bone.
|
||||
VSOutputTx VSSkinnedOneLightOneBone(VSInputNmTxWeights vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
Skin(vin, 1);
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 1);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: one light, two bones.
|
||||
VSOutputTx VSSkinnedOneLightTwoBones(VSInputNmTxWeights vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
Skin(vin, 2);
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 1);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: one light, four bones.
|
||||
VSOutputTx VSSkinnedOneLightFourBones(VSInputNmTxWeights vin)
|
||||
{
|
||||
VSOutputTx vout;
|
||||
|
||||
Skin(vin, 4);
|
||||
|
||||
CommonVSOutput cout = ComputeCommonVSOutputWithLighting(vin.Position, vin.Normal, 1);
|
||||
SetCommonVSOutputParams;
|
||||
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: pixel lighting, one bone.
|
||||
VSOutputPixelLightingTx VSSkinnedPixelLightingOneBone(VSInputNmTxWeights vin)
|
||||
{
|
||||
VSOutputPixelLightingTx vout;
|
||||
|
||||
Skin(vin, 1);
|
||||
|
||||
CommonVSOutputPixelLighting cout = ComputeCommonVSOutputPixelLighting(vin.Position, vin.Normal);
|
||||
SetCommonVSOutputParamsPixelLighting;
|
||||
|
||||
vout.Diffuse = float4(1, 1, 1, DiffuseColor.a);
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: pixel lighting, two bones.
|
||||
VSOutputPixelLightingTx VSSkinnedPixelLightingTwoBones(VSInputNmTxWeights vin)
|
||||
{
|
||||
VSOutputPixelLightingTx vout;
|
||||
|
||||
Skin(vin, 2);
|
||||
|
||||
CommonVSOutputPixelLighting cout = ComputeCommonVSOutputPixelLighting(vin.Position, vin.Normal);
|
||||
SetCommonVSOutputParamsPixelLighting;
|
||||
|
||||
vout.Diffuse = float4(1, 1, 1, DiffuseColor.a);
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Vertex shader: pixel lighting, four bones.
|
||||
VSOutputPixelLightingTx VSSkinnedPixelLightingFourBones(VSInputNmTxWeights vin)
|
||||
{
|
||||
VSOutputPixelLightingTx vout;
|
||||
|
||||
Skin(vin, 4);
|
||||
|
||||
CommonVSOutputPixelLighting cout = ComputeCommonVSOutputPixelLighting(vin.Position, vin.Normal);
|
||||
SetCommonVSOutputParamsPixelLighting;
|
||||
|
||||
vout.Diffuse = float4(1, 1, 1, DiffuseColor.a);
|
||||
vout.TexCoord = vin.TexCoord;
|
||||
|
||||
return vout;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: vertex lighting.
|
||||
float4 PSSkinnedVertexLighting(PSInputTx pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
AddSpecular(color, pin.Specular.rgb);
|
||||
ApplyFog(color, pin.Specular.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: vertex lighting, no fog.
|
||||
float4 PSSkinnedVertexLightingNoFog(PSInputTx pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
AddSpecular(color, pin.Specular.rgb);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader: pixel lighting.
|
||||
float4 PSSkinnedPixelLighting(PSInputPixelLightingTx pin) : SV_Target0
|
||||
{
|
||||
float4 color = SAMPLE_TEXTURE(Texture, pin.TexCoord) * pin.Diffuse;
|
||||
|
||||
float3 eyeVector = normalize(EyePosition - pin.PositionWS.xyz);
|
||||
float3 worldNormal = normalize(pin.NormalWS);
|
||||
|
||||
ColorPair lightResult = ComputeLights(eyeVector, worldNormal, 3);
|
||||
|
||||
color.rgb *= lightResult.Diffuse;
|
||||
|
||||
AddSpecular(color, lightResult.Specular);
|
||||
ApplyFog(color, pin.PositionWS.w);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
VertexShader VSArray[9] =
|
||||
{
|
||||
compile vs_2_0 VSSkinnedVertexLightingOneBone(),
|
||||
compile vs_2_0 VSSkinnedVertexLightingTwoBones(),
|
||||
compile vs_2_0 VSSkinnedVertexLightingFourBones(),
|
||||
|
||||
compile vs_2_0 VSSkinnedOneLightOneBone(),
|
||||
compile vs_2_0 VSSkinnedOneLightTwoBones(),
|
||||
compile vs_2_0 VSSkinnedOneLightFourBones(),
|
||||
|
||||
compile vs_2_0 VSSkinnedPixelLightingOneBone(),
|
||||
compile vs_2_0 VSSkinnedPixelLightingTwoBones(),
|
||||
compile vs_2_0 VSSkinnedPixelLightingFourBones(),
|
||||
};
|
||||
|
||||
|
||||
int VSIndices[18] =
|
||||
{
|
||||
0, // vertex lighting, one bone
|
||||
0, // vertex lighting, one bone, no fog
|
||||
1, // vertex lighting, two bones
|
||||
1, // vertex lighting, two bones, no fog
|
||||
2, // vertex lighting, four bones
|
||||
2, // vertex lighting, four bones, no fog
|
||||
|
||||
3, // one light, one bone
|
||||
3, // one light, one bone, no fog
|
||||
4, // one light, two bones
|
||||
4, // one light, two bones, no fog
|
||||
5, // one light, four bones
|
||||
5, // one light, four bones, no fog
|
||||
|
||||
6, // pixel lighting, one bone
|
||||
6, // pixel lighting, one bone, no fog
|
||||
7, // pixel lighting, two bones
|
||||
7, // pixel lighting, two bones, no fog
|
||||
8, // pixel lighting, four bones
|
||||
8, // pixel lighting, four bones, no fog
|
||||
};
|
||||
|
||||
|
||||
PixelShader PSArray[3] =
|
||||
{
|
||||
compile ps_2_0 PSSkinnedVertexLighting(),
|
||||
compile ps_2_0 PSSkinnedVertexLightingNoFog(),
|
||||
compile ps_2_0 PSSkinnedPixelLighting(),
|
||||
};
|
||||
|
||||
|
||||
int PSIndices[18] =
|
||||
{
|
||||
0, // vertex lighting, one bone
|
||||
1, // vertex lighting, one bone, no fog
|
||||
0, // vertex lighting, two bones
|
||||
1, // vertex lighting, two bones, no fog
|
||||
0, // vertex lighting, four bones
|
||||
1, // vertex lighting, four bones, no fog
|
||||
|
||||
0, // one light, one bone
|
||||
1, // one light, one bone, no fog
|
||||
0, // one light, two bones
|
||||
1, // one light, two bones, no fog
|
||||
0, // one light, four bones
|
||||
1, // one light, four bones, no fog
|
||||
|
||||
2, // pixel lighting, one bone
|
||||
2, // pixel lighting, one bone, no fog
|
||||
2, // pixel lighting, two bones
|
||||
2, // pixel lighting, two bones, no fog
|
||||
2, // pixel lighting, four bones
|
||||
2, // pixel lighting, four bones, no fog
|
||||
};
|
||||
|
||||
|
||||
int ShaderIndex = 0;
|
||||
|
||||
|
||||
Technique SkinnedEffect
|
||||
{
|
||||
Pass
|
||||
{
|
||||
VertexShader = (VSArray[VSIndices[ShaderIndex]]);
|
||||
PixelShader = (PSArray[PSIndices[ShaderIndex]]);
|
||||
}
|
||||
}
|
44
shader/XNA/SpriteEffect.fx
Normal file
44
shader/XNA/SpriteEffect.fx
Normal file
@ -0,0 +1,44 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// SpriteEffect.fx
|
||||
//
|
||||
// Microsoft XNA Community Game Platform
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "Macros.fxh"
|
||||
|
||||
|
||||
DECLARE_TEXTURE(Texture, 0);
|
||||
|
||||
|
||||
BEGIN_CONSTANTS
|
||||
MATRIX_CONSTANTS
|
||||
|
||||
float4x4 MatrixTransform _vs(c0) _cb(c0);
|
||||
|
||||
END_CONSTANTS
|
||||
|
||||
|
||||
void SpriteVertexShader(inout float4 color : COLOR0,
|
||||
inout float2 texCoord : TEXCOORD0,
|
||||
inout float4 position : SV_Position)
|
||||
{
|
||||
position = mul(position, MatrixTransform);
|
||||
}
|
||||
|
||||
|
||||
float4 SpritePixelShader(float4 color : COLOR0,
|
||||
float2 texCoord : TEXCOORD0) : SV_Target0
|
||||
{
|
||||
return SAMPLE_TEXTURE(Texture, texCoord) * color;
|
||||
}
|
||||
|
||||
|
||||
technique SpriteBatch
|
||||
{
|
||||
pass
|
||||
{
|
||||
VertexShader = compile vs_2_0 SpriteVertexShader();
|
||||
PixelShader = compile ps_2_0 SpritePixelShader();
|
||||
}
|
||||
}
|
226
shader/XNA/Structures.fxh
Normal file
226
shader/XNA/Structures.fxh
Normal file
@ -0,0 +1,226 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Structurs.fxh
|
||||
//
|
||||
// Microsoft XNA Community Game Platform
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Vertex shader input structures.
|
||||
|
||||
struct VSInput
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
};
|
||||
|
||||
struct VSInputVc
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
float4 Color : COLOR;
|
||||
};
|
||||
|
||||
struct VSInputTx
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VSInputTxVc
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float4 Color : COLOR;
|
||||
};
|
||||
|
||||
struct VSInputNm
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
float3 Normal : NORMAL;
|
||||
};
|
||||
|
||||
struct VSInputNmVc
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
float3 Normal : NORMAL;
|
||||
float4 Color : COLOR;
|
||||
};
|
||||
|
||||
struct VSInputNmTx
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
float3 Normal : NORMAL;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VSInputNmTxVc
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
float3 Normal : NORMAL;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float4 Color : COLOR;
|
||||
};
|
||||
|
||||
struct VSInputTx2
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float2 TexCoord2 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct VSInputTx2Vc
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float2 TexCoord2 : TEXCOORD1;
|
||||
float4 Color : COLOR;
|
||||
};
|
||||
|
||||
struct VSInputNmTxWeights
|
||||
{
|
||||
float4 Position : SV_Position;
|
||||
float3 Normal : NORMAL;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
int4 Indices : BLENDINDICES0;
|
||||
float4 Weights : BLENDWEIGHT0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Vertex shader output structures.
|
||||
|
||||
struct VSOutput
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 Specular : COLOR1;
|
||||
float4 PositionPS : SV_Position;
|
||||
};
|
||||
|
||||
struct VSOutputNoFog
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 PositionPS : SV_Position;
|
||||
};
|
||||
|
||||
struct VSOutputTx
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 Specular : COLOR1;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float4 PositionPS : SV_Position;
|
||||
};
|
||||
|
||||
struct VSOutputTxNoFog
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float4 PositionPS : SV_Position;
|
||||
};
|
||||
|
||||
struct VSOutputPixelLighting
|
||||
{
|
||||
float4 PositionWS : TEXCOORD0;
|
||||
float3 NormalWS : TEXCOORD1;
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 PositionPS : SV_Position;
|
||||
};
|
||||
|
||||
struct VSOutputPixelLightingTx
|
||||
{
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float4 PositionWS : TEXCOORD1;
|
||||
float3 NormalWS : TEXCOORD2;
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 PositionPS : SV_Position;
|
||||
};
|
||||
|
||||
struct VSOutputTx2
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 Specular : COLOR1;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float2 TexCoord2 : TEXCOORD1;
|
||||
float4 PositionPS : SV_Position;
|
||||
};
|
||||
|
||||
struct VSOutputTx2NoFog
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float2 TexCoord2 : TEXCOORD1;
|
||||
float4 PositionPS : SV_Position;
|
||||
};
|
||||
|
||||
struct VSOutputTxEnvMap
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 Specular : COLOR1;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float3 EnvCoord : TEXCOORD1;
|
||||
float4 PositionPS : SV_Position;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Pixel shader input structures.
|
||||
|
||||
struct PSInput
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 Specular : COLOR1;
|
||||
};
|
||||
|
||||
struct PSInputNoFog
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
};
|
||||
|
||||
struct PSInputTx
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 Specular : COLOR1;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PSInputTxNoFog
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PSInputPixelLighting
|
||||
{
|
||||
float4 PositionWS : TEXCOORD0;
|
||||
float3 NormalWS : TEXCOORD1;
|
||||
float4 Diffuse : COLOR0;
|
||||
};
|
||||
|
||||
struct PSInputPixelLightingTx
|
||||
{
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float4 PositionWS : TEXCOORD1;
|
||||
float3 NormalWS : TEXCOORD2;
|
||||
float4 Diffuse : COLOR0;
|
||||
};
|
||||
|
||||
struct PSInputTx2
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 Specular : COLOR1;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float2 TexCoord2 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct PSInputTx2NoFog
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float2 TexCoord2 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct PSInputTxEnvMap
|
||||
{
|
||||
float4 Diffuse : COLOR0;
|
||||
float4 Specular : COLOR1;
|
||||
float2 TexCoord : TEXCOORD0;
|
||||
float3 EnvCoord : TEXCOORD1;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user