Răsfoiți Sursa

StaticLightMapChannels Sample

Nikos Kastellanos 6 ani în urmă
părinte
comite
d5a80a45f5

+ 17 - 0
Samples.WINDOWS.MG.sln

@@ -42,6 +42,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Atlas.WINDOWS.MG",
 		{E710FBEA-8C75-405D-B6B4-CFC82CB48FB5} = {E710FBEA-8C75-405D-B6B4-CFC82CB48FB5}
 		{E710FBEA-8C75-405D-B6B4-CFC82CB48FB5} = {E710FBEA-8C75-405D-B6B4-CFC82CB48FB5}
 	EndProjectSection
 	EndProjectSection
 EndProject
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLMCImporter.WINDOWS.MG", "Content.Pipeline\SLMCImporter\SLMCImporter.WINDOWS.MG.csproj", "{C9FA924B-DA91-4641-8B7D-CBC09E5560AE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.SLMC.WINDOWS.MG", "Samples\SLMC\Samples.SLMC.WINDOWS.MG.csproj", "{DC1BD888-3D11-4557-AC59-8271DC991ED1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{C9FA924B-DA91-4641-8B7D-CBC09E5560AE} = {C9FA924B-DA91-4641-8B7D-CBC09E5560AE}
+	EndProjectSection
+EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
@@ -108,6 +115,14 @@ Global
 		{E605A7E1-EAE9-4EBF-941D-D88A6C1DC568}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{E605A7E1-EAE9-4EBF-941D-D88A6C1DC568}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{E605A7E1-EAE9-4EBF-941D-D88A6C1DC568}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E605A7E1-EAE9-4EBF-941D-D88A6C1DC568}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E605A7E1-EAE9-4EBF-941D-D88A6C1DC568}.Release|Any CPU.Build.0 = Release|Any CPU
 		{E605A7E1-EAE9-4EBF-941D-D88A6C1DC568}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C9FA924B-DA91-4641-8B7D-CBC09E5560AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{C9FA924B-DA91-4641-8B7D-CBC09E5560AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C9FA924B-DA91-4641-8B7D-CBC09E5560AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{C9FA924B-DA91-4641-8B7D-CBC09E5560AE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DC1BD888-3D11-4557-AC59-8271DC991ED1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DC1BD888-3D11-4557-AC59-8271DC991ED1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DC1BD888-3D11-4557-AC59-8271DC991ED1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DC1BD888-3D11-4557-AC59-8271DC991ED1}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE
@@ -125,5 +140,7 @@ Global
 		{4F224B03-7499-4EE0-A072-7CD7FC266E2A} = {584E505E-859A-4DA8-9235-EE6C61C03479}
 		{4F224B03-7499-4EE0-A072-7CD7FC266E2A} = {584E505E-859A-4DA8-9235-EE6C61C03479}
 		{594B1001-B485-499A-A22B-42125763C2CF} = {584E505E-859A-4DA8-9235-EE6C61C03479}
 		{594B1001-B485-499A-A22B-42125763C2CF} = {584E505E-859A-4DA8-9235-EE6C61C03479}
 		{E605A7E1-EAE9-4EBF-941D-D88A6C1DC568} = {584E505E-859A-4DA8-9235-EE6C61C03479}
 		{E605A7E1-EAE9-4EBF-941D-D88A6C1DC568} = {584E505E-859A-4DA8-9235-EE6C61C03479}
+		{C9FA924B-DA91-4641-8B7D-CBC09E5560AE} = {A921886B-C6F7-4FF8-8668-EC20004C464A}
+		{DC1BD888-3D11-4557-AC59-8271DC991ED1} = {584E505E-859A-4DA8-9235-EE6C61C03479}
 	EndGlobalSection
 	EndGlobalSection
 EndGlobal
 EndGlobal

+ 19 - 0
Samples.WINDOWS.XNA.sln

@@ -41,6 +41,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Atlas.WINDOWS.XNA",
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.AtlasContent", "Samples\AtlasContent\Samples.AtlasContent.contentproj", "{4CA82D0E-2414-460C-9A70-2DA3C3AF96B6}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.AtlasContent", "Samples\AtlasContent\Samples.AtlasContent.contentproj", "{4CA82D0E-2414-460C-9A70-2DA3C3AF96B6}"
 EndProject
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLMCImporter.WINDOWS.XNA", "Content.Pipeline\SLMCImporter\SLMCImporter.WINDOWS.XNA.csproj", "{497B1130-EB63-4057-BC40-F60D6FFA50CA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.SLMC.WINDOWS.XNA", "Samples\SLMC\Samples.SLMC.WINDOWS.XNA.csproj", "{47F16ADE-1B63-476A-81AB-454C46ABD974}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.SLMCContent", "Samples\SLMCContent\Samples.SLMCContent.contentproj", "{99A5C5A9-03E3-41C6-A121-EF423F6CEB23}"
+EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|x86 = Debug|x86
 		Debug|x86 = Debug|x86
@@ -107,6 +113,16 @@ Global
 		{0499C7DC-EBF2-4F77-871B-1EC613B379D9}.Release|x86.Build.0 = Release|x86
 		{0499C7DC-EBF2-4F77-871B-1EC613B379D9}.Release|x86.Build.0 = Release|x86
 		{4CA82D0E-2414-460C-9A70-2DA3C3AF96B6}.Debug|x86.ActiveCfg = Debug|x86
 		{4CA82D0E-2414-460C-9A70-2DA3C3AF96B6}.Debug|x86.ActiveCfg = Debug|x86
 		{4CA82D0E-2414-460C-9A70-2DA3C3AF96B6}.Release|x86.ActiveCfg = Release|x86
 		{4CA82D0E-2414-460C-9A70-2DA3C3AF96B6}.Release|x86.ActiveCfg = Release|x86
+		{497B1130-EB63-4057-BC40-F60D6FFA50CA}.Debug|x86.ActiveCfg = Debug|x86
+		{497B1130-EB63-4057-BC40-F60D6FFA50CA}.Debug|x86.Build.0 = Debug|x86
+		{497B1130-EB63-4057-BC40-F60D6FFA50CA}.Release|x86.ActiveCfg = Release|x86
+		{497B1130-EB63-4057-BC40-F60D6FFA50CA}.Release|x86.Build.0 = Release|x86
+		{47F16ADE-1B63-476A-81AB-454C46ABD974}.Debug|x86.ActiveCfg = Debug|x86
+		{47F16ADE-1B63-476A-81AB-454C46ABD974}.Debug|x86.Build.0 = Debug|x86
+		{47F16ADE-1B63-476A-81AB-454C46ABD974}.Release|x86.ActiveCfg = Release|x86
+		{47F16ADE-1B63-476A-81AB-454C46ABD974}.Release|x86.Build.0 = Release|x86
+		{99A5C5A9-03E3-41C6-A121-EF423F6CEB23}.Debug|x86.ActiveCfg = Debug|x86
+		{99A5C5A9-03E3-41C6-A121-EF423F6CEB23}.Release|x86.ActiveCfg = Release|x86
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE
@@ -115,6 +131,7 @@ Global
 		{565ACF47-7E36-435E-8727-2AFB39E61134} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
 		{565ACF47-7E36-435E-8727-2AFB39E61134} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
 		{E22F02E7-6799-4C14-B9B3-B461D6E9AB6E} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
 		{E22F02E7-6799-4C14-B9B3-B461D6E9AB6E} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
 		{90E6017D-198B-4470-BF9B-8B8791C295CC} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
 		{90E6017D-198B-4470-BF9B-8B8791C295CC} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
+		{497B1130-EB63-4057-BC40-F60D6FFA50CA} = {F6B6E505-6037-49E4-9060-8B29A7B99BC1}
 		{89E0198E-7298-411A-B5C1-61F2754A3F80} = {EFC7A27C-C20B-4BE7-8B3A-2B109991D704}
 		{89E0198E-7298-411A-B5C1-61F2754A3F80} = {EFC7A27C-C20B-4BE7-8B3A-2B109991D704}
 		{B82B862D-C728-4A10-8A56-65D688E022C8} = {EFC7A27C-C20B-4BE7-8B3A-2B109991D704}
 		{B82B862D-C728-4A10-8A56-65D688E022C8} = {EFC7A27C-C20B-4BE7-8B3A-2B109991D704}
 		{908EC8FF-B0ED-478A-B486-702E578AF64A} = {EFC7A27C-C20B-4BE7-8B3A-2B109991D704}
 		{908EC8FF-B0ED-478A-B486-702E578AF64A} = {EFC7A27C-C20B-4BE7-8B3A-2B109991D704}
@@ -126,5 +143,7 @@ Global
 		{FEFA33C9-E197-458C-845E-5FA513C38DF4} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
 		{FEFA33C9-E197-458C-845E-5FA513C38DF4} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
 		{0499C7DC-EBF2-4F77-871B-1EC613B379D9} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
 		{0499C7DC-EBF2-4F77-871B-1EC613B379D9} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
 		{4CA82D0E-2414-460C-9A70-2DA3C3AF96B6} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
 		{4CA82D0E-2414-460C-9A70-2DA3C3AF96B6} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
+		{47F16ADE-1B63-476A-81AB-454C46ABD974} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
+		{99A5C5A9-03E3-41C6-A121-EF423F6CEB23} = {45FFB286-52CE-4EB7-8ACE-8B6FBD18D616}
 	EndGlobalSection
 	EndGlobalSection
 EndGlobal
 EndGlobal

BIN
Samples/SLMC/Game.ico


+ 123 - 0
Samples/SLMC/Game1.cs

@@ -0,0 +1,123 @@
+using System;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+
+namespace Samples.SLMC
+{
+    public class Game1 : Microsoft.Xna.Framework.Game
+    {
+        GraphicsDeviceManager graphics;
+        SpriteBatch spriteBatch;
+        SpriteFont font;
+
+        KeyboardState previousKeyboardState;
+        
+        int mipLevel = 0;
+        Rectangle rtSize;
+        RenderTarget2D rt;
+
+        Texture2D tx;
+        
+        public Game1()
+        {
+            graphics = new GraphicsDeviceManager(this);
+            Content.RootDirectory = "Content";
+
+            graphics.GraphicsProfile = GraphicsProfile.HiDef;
+            graphics.PreferredBackBufferWidth = 800;
+            graphics.PreferredBackBufferHeight = 480;
+        }
+
+        protected override void LoadContent()
+        {            
+            spriteBatch = new SpriteBatch(GraphicsDevice);
+            font = Content.Load<SpriteFont>("font");
+            
+            tx = Content.Load<Texture2D>("b_c0123");
+
+            rtSize = new Rectangle(0, 0, tx.Width * (1+4), tx.Height);
+            graphics.PreferredBackBufferWidth = (int)rtSize.Width;
+            graphics.PreferredBackBufferHeight = (int)rtSize.Height;
+            graphics.ApplyChanges();
+
+            rt = new RenderTarget2D(GraphicsDevice, rtSize.Width, rtSize.Height);
+        }
+        
+        /// <param name="gameTime">Provides a snapshot of timing values.</param>
+        protected override void Update(GameTime gameTime)
+        {
+            KeyboardState keyState = Keyboard.GetState();
+            GamePadState gamePadState = GamePad.GetState(PlayerIndex.One);
+
+            if (keyState.IsKeyDown(Keys.Escape) || gamePadState.Buttons.Back == ButtonState.Pressed)
+                Exit();
+
+            if (keyState.IsKeyDown(Keys.OemPlus) && !previousKeyboardState.IsKeyDown(Keys.OemPlus) && mipLevel < tx.LevelCount-1)
+                mipLevel++;
+            if (keyState.IsKeyDown(Keys.Add) && !previousKeyboardState.IsKeyDown(Keys.Add) && mipLevel < tx.LevelCount-1)
+                mipLevel++;
+            if (keyState.IsKeyDown(Keys.OemMinus) && !previousKeyboardState.IsKeyDown(Keys.OemMinus) && mipLevel > 0)
+                mipLevel--;
+            if (keyState.IsKeyDown(Keys.Subtract) && !previousKeyboardState.IsKeyDown(Keys.Subtract) && mipLevel > 0)
+                mipLevel--;
+            
+            previousKeyboardState = keyState;
+            base.Update(gameTime);
+        }
+        
+        protected override void Draw(GameTime gameTime)
+        {
+            GraphicsDevice.BlendState = BlendState.Opaque;
+            GraphicsDevice.DepthStencilState = DepthStencilState.Default;
+
+            int mipLevel2 = (int)Math.Pow(2, mipLevel);
+            var mipSize = rtSize;
+            mipSize.Width /= mipLevel2;
+            mipSize.Height /= mipLevel2;
+
+            GraphicsDevice.SetRenderTarget(rt);
+            GraphicsDevice.Clear(Color.Black);
+
+            spriteBatch.Begin();
+            {
+                var destRect = new Rectangle(0, 0, tx.Width, tx.Height);
+                destRect.X /= mipLevel2;
+                destRect.Y /= mipLevel2;
+                destRect.Width /= mipLevel2;
+                destRect.Height /= mipLevel2;
+                
+                // draw all channels
+                destRect.X = (tx.Width * 0) / mipLevel2;
+                spriteBatch.Draw(tx, destRect, Color.White);
+
+                // draw each channels                 
+                destRect.X = (tx.Width * 1) / mipLevel2;
+                spriteBatch.Draw(tx, destRect, new Color(1f, 0f, 0f, 0f));
+                destRect.X = (tx.Width * 2) / mipLevel2;
+                spriteBatch.Draw(tx, destRect, new Color(0f, 1f, 0f, 0f));
+                destRect.X = (tx.Width * 3) / mipLevel2;
+                spriteBatch.Draw(tx, destRect, new Color(0f, 0f, 1f, 0f));
+                destRect.X = (tx.Width * 4) / mipLevel2;
+                spriteBatch.Draw(tx, destRect, new Color(0f, 0f, 0f, 1f)); // NOTE: alpha channel is not visible                
+            }
+            spriteBatch.End();
+
+            
+            GraphicsDevice.SetRenderTarget(null);
+            GraphicsDevice.Clear(Color.CornflowerBlue);
+            spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointWrap, null, null);
+            spriteBatch.Draw(rt, rtSize, mipSize, Color.White);
+            spriteBatch.End();
+
+
+            spriteBatch.Begin();
+            spriteBatch.DrawString(font, String.Format("[+/-] MipLevel - ({0})", mipLevel), new Vector2(11, 11), Color.Black);
+            spriteBatch.DrawString(font, String.Format("[+/-] MipLevel - ({0})", mipLevel), new Vector2(10, 10), Color.White);
+            spriteBatch.End();
+
+            base.Draw(gameTime);
+        }
+        
+    }
+}

BIN
Samples/SLMC/GameThumbnail.png


BIN
Samples/SLMC/Icon.ico


+ 19 - 0
Samples/SLMC/Program.cs

@@ -0,0 +1,19 @@
+using System;
+
+namespace Samples.SLMC
+{
+#if WINDOWS || XBOX || LINUX
+    public static class Program
+    {
+        [STAThread]
+        static void Main(string[] args)
+        {
+            using (Game1 game = new Game1())
+            {
+                game.Run();
+            }
+        }
+    }
+#endif
+}
+

+ 34 - 0
Samples/SLMC/Properties/AssemblyInfo.cs

@@ -0,0 +1,34 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Samples.SLMC")]
+[assembly: AssemblyProduct("Samples.SLMC")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyCopyright("Copyright © Kastellanos Nikolaos 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type. Only Windows
+// assemblies support COM.
+[assembly: ComVisible(false)]
+
+// On Windows, the following GUID is for the ID of the typelib if this
+// project is exposed to COM. On other platforms, it unique identifies the
+// title storage container when deploying this assembly to the device.
+[assembly: Guid("9A5E6A6C-941C-46C6-AA25-920C0E6F3910")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]

+ 77 - 0
Samples/SLMC/Samples.SLMC.WINDOWS.MG.csproj

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{DC1BD888-3D11-4557-AC59-8271DC991ED1}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Samples.SLMC</RootNamespace>
+    <AssemblyName>Samples.SLMC</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <MonoGamePlatform>Windows</MonoGamePlatform>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>Icon.ico</ApplicationIcon>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationManifest>app.manifest</ApplicationManifest>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;WINDOWS MG</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>true</Prefer32Bit>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE;WINDOWS MG</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="Game1.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="MonoGame.Framework">
+      <HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Icon.ico" />
+  </ItemGroup>
+  <ItemGroup>
+    <MonoGameContentReference Include="..\SLMCContent\Samples.SLMCContent.mgcb">
+      <Link>Content\Content.mgcb</Link>
+    </MonoGameContentReference>
+    <None Include="app.config" />
+    <None Include="app.manifest" />
+  </ItemGroup>
+  <ItemGroup>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.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>

+ 125 - 0
Samples/SLMC/Samples.SLMC.WINDOWS.XNA.csproj

@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{47F16ADE-1B63-476A-81AB-454C46ABD974}</ProjectGuid>
+    <ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Samples.SLMC</RootNamespace>
+    <AssemblyName>Samples.SLMC</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+    <XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
+    <XnaPlatform>Windows</XnaPlatform>
+    <XnaProfile>Reach</XnaProfile>
+    <XnaCrossPlatformGroupID>{82877B4-95D2-4472-856A-A1803243FA06</XnaCrossPlatformGroupID>
+    <XnaOutputType>Game</XnaOutputType>
+    <ApplicationIcon>Game.ico</ApplicationIcon>
+    <Thumbnail>GameThumbnail.png</Thumbnail>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\Windows\XNA\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;WINDOWS XNA</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoStdLib>true</NoStdLib>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <PlatformTarget>x86</PlatformTarget>
+    <XnaCompressContent>false</XnaCompressContent>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\Windows\XNA\</OutputPath>
+    <DefineConstants>TRACE;WINDOWS XNA</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoStdLib>true</NoStdLib>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <PlatformTarget>x86</PlatformTarget>
+    <XnaCompressContent>true</XnaCompressContent>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
+    <Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
+    <Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
+    <Reference Include="mscorlib" />
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Game1.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Game.ico" />
+    <Content Include="GameThumbnail.png">
+      <XnaPlatformSpecific>true</XnaPlatformSpecific>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\SLMCContent\Samples.SLMCContent.contentproj">
+      <Project>{99A5C5A9-03E3-41C6-A121-EF423F6CEB23}</Project>
+      <Name>Samples.SLMCContent %28Content%29</Name>
+      <XnaReferenceType>Content</XnaReferenceType>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Xna.Framework.4.0">
+      <Visible>False</Visible>
+      <ProductName>Microsoft XNA Framework Redistributable 4.0</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.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>

+ 3 - 0
Samples/SLMC/app.config

@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>

+ 42 - 0
Samples/SLMC/app.manifest

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
+  <assemblyIdentity version="1.0.0.0" name="Graphics"/>
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+    <security>
+      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
+        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
+      </requestedPrivileges>
+    </security>
+  </trustInfo>
+
+  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+    <application>
+      <!-- A list of the Windows versions that this application has been tested on and is
+           is designed to work with. Uncomment the appropriate elements and Windows will 
+           automatically selected the most compatible environment. -->
+
+      <!-- Windows Vista -->
+      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
+
+      <!-- Windows 7 -->
+      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
+
+      <!-- Windows 8 -->
+      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
+
+      <!-- Windows 8.1 -->
+      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
+
+      <!-- Windows 10 -->
+      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
+
+    </application>
+  </compatibility>
+
+  <application xmlns="urn:schemas-microsoft-com:asm.v3">
+    <windowsSettings>
+      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
+    </windowsSettings>
+  </application>
+
+</assembly>

BIN
Samples/SLMCContent/Channels/b_c0.png


BIN
Samples/SLMCContent/Channels/b_c1.png


BIN
Samples/SLMCContent/Channels/b_c2.png


BIN
Samples/SLMCContent/Channels/b_c3.png


+ 59 - 0
Samples/SLMCContent/Samples.SLMCContent.contentproj

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{99A5C5A9-03E3-41C6-A121-EF423F6CEB23}</ProjectGuid>
+    <ProjectTypeGuids>{96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
+    <OutputPath>bin\$(Platform)\$(Configuration)</OutputPath>
+    <ContentRootDirectory>Content</ContentRootDirectory>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup>
+    <RootNamespace>Samples.SLMCContent</RootNamespace>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.TextureImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="font.spritefont">
+      <Name>font</Name>
+      <Importer>FontDescriptionImporter</Importer>
+      <Processor>FontDescriptionProcessor</Processor>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Content.Pipeline\SLMCImporter\SLMCImporter.WINDOWS.XNA.csproj">
+      <Project>{497B1130-EB63-4057-BC40-F60D6FFA50CA}</Project>
+      <Name>SLMCImporter.WINDOWS.XNA</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="b_c0123.slmc">
+      <Name>b_c0123</Name>
+      <Processor>SLMCProcessor</Processor>
+      <Importer>SLMCImporter</Importer>
+      <ProcessorParameters_GenerateMipmaps>True</ProcessorParameters_GenerateMipmaps>
+      <ProcessorParameters_TextureFormat>BGRA4444</ProcessorParameters_TextureFormat>
+    </Compile>
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.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>

+ 30 - 0
Samples/SLMCContent/Samples.SLMCContent.mgcb

@@ -0,0 +1,30 @@
+
+#----------------------------- Global Properties ----------------------------#
+
+/outputDir:bin/$(Platform)
+/intermediateDir:obj/$(Platform)
+/platform:Windows
+/config:
+/profile:Reach
+/compress:False
+
+#-------------------------------- References --------------------------------#
+
+/reference:..\..\bin\Debug\Windows\Aether.Content.Pipeline.SLMCImporter.dll
+
+#---------------------------------- Content ---------------------------------#
+
+#begin font.spritefont
+/importer:FontDescriptionImporter
+/processor:FontDescriptionProcessor
+/processorParam:PremultiplyAlpha=True
+/processorParam:TextureFormat=Compressed
+/build:font.spritefont
+
+#begin b_c0123.slmc
+/importer:SLMCImporter
+/processor:SLMCProcessor
+/processorParam:TextureFormat=BGRA4444
+/processorParam:GenerateMipmaps=True
+/build:b_c0123.slmc
+

+ 7 - 0
Samples/SLMCContent/b_c0123.slmc

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<channels>
+   <image source="Channels/b_c0.png"/>
+   <image source="Channels/b_c1.png"/>
+   <image source="Channels/b_c2.png"/>
+   <image source="Channels/b_c3.png"/>
+</channels>

+ 60 - 0
Samples/SLMCContent/font.spritefont

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file contains an xml description of a font, and will be read by the XNA
+Framework Content Pipeline. Follow the comments to customize the appearance
+of the font in your game, and to change the characters which are available to draw
+with.
+-->
+<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
+  <Asset Type="Graphics:FontDescription">
+
+    <!--
+    Modify this string to change the font that will be imported.
+    -->
+    <FontName>Segoe UI Mono</FontName>
+
+    <!--
+    Size is a float value, measured in points. Modify this value to change
+    the size of the font.
+    -->
+    <Size>14</Size>
+
+    <!--
+    Spacing is a float value, measured in pixels. Modify this value to change
+    the amount of spacing in between characters.
+    -->
+    <Spacing>0</Spacing>
+
+    <!--
+    UseKerning controls the layout of the font. If this value is true, kerning information
+    will be used when placing characters.
+    -->
+    <UseKerning>true</UseKerning>
+
+    <!--
+    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
+    and "Bold, Italic", and are case sensitive.
+    -->
+    <Style>Regular</Style>
+
+    <!--
+    If you uncomment this line, the default character will be substituted if you draw
+    or measure text that contains characters which were not included in the font.
+    -->
+    <!-- <DefaultCharacter>*</DefaultCharacter> -->
+
+    <!--
+    CharacterRegions control what letters are available in the font. Every
+    character from Start to End will be built and made available for drawing. The
+    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
+    character set. The characters are ordered according to the Unicode standard.
+    See the documentation for more information.
+    -->
+    <CharacterRegions>
+      <CharacterRegion>
+        <Start>&#32;</Start>
+        <End>&#126;</End>
+      </CharacterRegion>
+    </CharacterRegions>
+  </Asset>
+</XnaContent>