- Translated the AlphaTest shader to GLSL (needs some more testing)
- Added a bunch of Development attributes - Fixed a class file name that was different from the class name itself
This commit is contained in:
parent
663dff347d
commit
73b50ab6c3
@ -1,5 +1,6 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
|
using ANX.Framework.NonXNA.RenderSystem;
|
||||||
using Microsoft.Xna.Framework.Content.Pipeline;
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
||||||
using ANX.RenderSystem.Windows.DX10;
|
using ANX.RenderSystem.Windows.DX10;
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using ANX.Framework.NonXNA.RenderSystem;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using Microsoft.Xna.Framework.Content.Pipeline;
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using ANX.Framework.NonXNA.RenderSystem;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using Microsoft.Xna.Framework.Content.Pipeline;
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
<Compile Include="ContainmentType.cs" />
|
<Compile Include="ContainmentType.cs" />
|
||||||
<Compile Include="Content\ContentSerializerAttribute.cs" />
|
<Compile Include="Content\ContentSerializerAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerIgnoreAttribute.cs" />
|
<Compile Include="Content\ContentSerializerIgnoreAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerItemNameAttribute.cs" />
|
<Compile Include="Content\ContentSerializerCollectionItemNameAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerRuntimeTypeAttribute.cs" />
|
<Compile Include="Content\ContentSerializerRuntimeTypeAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerTypeVersionAttribute.cs" />
|
<Compile Include="Content\ContentSerializerTypeVersionAttribute.cs" />
|
||||||
<Compile Include="Content\Decompressor.cs" />
|
<Compile Include="Content\Decompressor.cs" />
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
<Compile Include="ContainmentType.cs" />
|
<Compile Include="ContainmentType.cs" />
|
||||||
<Compile Include="Content\ContentSerializerAttribute.cs" />
|
<Compile Include="Content\ContentSerializerAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerIgnoreAttribute.cs" />
|
<Compile Include="Content\ContentSerializerIgnoreAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerItemNameAttribute.cs" />
|
<Compile Include="Content\ContentSerializerCollectionItemNameAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerRuntimeTypeAttribute.cs" />
|
<Compile Include="Content\ContentSerializerRuntimeTypeAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerTypeVersionAttribute.cs" />
|
<Compile Include="Content\ContentSerializerTypeVersionAttribute.cs" />
|
||||||
<Compile Include="Content\Decompressor.cs" />
|
<Compile Include="Content\Decompressor.cs" />
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
<Compile Include="ContainmentType.cs" />
|
<Compile Include="ContainmentType.cs" />
|
||||||
<Compile Include="Content\ContentSerializerAttribute.cs" />
|
<Compile Include="Content\ContentSerializerAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerIgnoreAttribute.cs" />
|
<Compile Include="Content\ContentSerializerIgnoreAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerItemNameAttribute.cs" />
|
<Compile Include="Content\ContentSerializerCollectionItemNameAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerRuntimeTypeAttribute.cs" />
|
<Compile Include="Content\ContentSerializerRuntimeTypeAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerTypeVersionAttribute.cs" />
|
<Compile Include="Content\ContentSerializerTypeVersionAttribute.cs" />
|
||||||
<Compile Include="Content\Decompressor.cs" />
|
<Compile Include="Content\Decompressor.cs" />
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
<Compile Include="ContainmentType.cs" />
|
<Compile Include="ContainmentType.cs" />
|
||||||
<Compile Include="Content\ContentSerializerAttribute.cs" />
|
<Compile Include="Content\ContentSerializerAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerIgnoreAttribute.cs" />
|
<Compile Include="Content\ContentSerializerIgnoreAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerItemNameAttribute.cs" />
|
<Compile Include="Content\ContentSerializerCollectionItemNameAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerRuntimeTypeAttribute.cs" />
|
<Compile Include="Content\ContentSerializerRuntimeTypeAttribute.cs" />
|
||||||
<Compile Include="Content\ContentSerializerTypeVersionAttribute.cs" />
|
<Compile Include="Content\ContentSerializerTypeVersionAttribute.cs" />
|
||||||
<Compile Include="Content\Decompressor.cs" />
|
<Compile Include="Content\Decompressor.cs" />
|
||||||
|
@ -14,7 +14,9 @@ namespace ANX.Framework.Content
|
|||||||
#if !WINDOWSMETRO //TODO: search replacement for Win8
|
#if !WINDOWSMETRO //TODO: search replacement for Win8
|
||||||
[SerializableAttribute]
|
[SerializableAttribute]
|
||||||
#endif
|
#endif
|
||||||
|
[PercentageComplete(95)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public class ContentLoadException : Exception
|
public class ContentLoadException : Exception
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -11,6 +11,7 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public class ContentManager : IDisposable
|
public class ContentManager : IDisposable
|
||||||
{
|
{
|
||||||
#region Constants
|
#region Constants
|
||||||
|
@ -16,6 +16,7 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public sealed class ContentReader : BinaryReader
|
public sealed class ContentReader : BinaryReader
|
||||||
{
|
{
|
||||||
private GraphicsProfile graphicsProfile;
|
private GraphicsProfile graphicsProfile;
|
||||||
|
@ -11,7 +11,9 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
|
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
|
||||||
|
[PercentageComplete(100)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public sealed class ContentSerializerAttribute : Attribute
|
public sealed class ContentSerializerAttribute : Attribute
|
||||||
{
|
{
|
||||||
public string ElementName { get; set; }
|
public string ElementName { get; set; }
|
||||||
@ -20,25 +22,22 @@ namespace ANX.Framework.Content
|
|||||||
|
|
||||||
public bool Optional { get; set; }
|
public bool Optional { get; set; }
|
||||||
|
|
||||||
private bool allowNull = true;
|
public bool AllowNull { get; set; }
|
||||||
public bool AllowNull
|
|
||||||
{
|
|
||||||
get { return this.allowNull; }
|
|
||||||
set { this.allowNull = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool SharedResource { get; set; }
|
public bool SharedResource { get; set; }
|
||||||
|
|
||||||
private string collectionItemName;
|
private string collectionItemName;
|
||||||
|
|
||||||
|
public ContentSerializerAttribute()
|
||||||
|
{
|
||||||
|
AllowNull = true;
|
||||||
|
}
|
||||||
|
|
||||||
public string CollectionItemName
|
public string CollectionItemName
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(this.collectionItemName))
|
return string.IsNullOrEmpty(this.collectionItemName) ? "Item" : this.collectionItemName;
|
||||||
{
|
|
||||||
return "Item";
|
|
||||||
}
|
|
||||||
return this.collectionItemName;
|
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
@ -65,7 +64,7 @@ namespace ANX.Framework.Content
|
|||||||
ElementName = this.ElementName,
|
ElementName = this.ElementName,
|
||||||
FlattenContent = this.FlattenContent,
|
FlattenContent = this.FlattenContent,
|
||||||
Optional = this.Optional,
|
Optional = this.Optional,
|
||||||
allowNull = this.allowNull,
|
AllowNull = this.AllowNull,
|
||||||
SharedResource = this.SharedResource,
|
SharedResource = this.SharedResource,
|
||||||
collectionItemName = this.collectionItemName
|
collectionItemName = this.collectionItemName
|
||||||
};
|
};
|
||||||
|
@ -7,27 +7,21 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
|
|
||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
|
[PercentageComplete(100)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public sealed class ContentSerializerCollectionItemNameAttribute : Attribute
|
public sealed class ContentSerializerCollectionItemNameAttribute : Attribute
|
||||||
{
|
{
|
||||||
private string collectionItemName;
|
public string CollectionItemName { get; private set; }
|
||||||
|
|
||||||
public string CollectionItemName
|
public ContentSerializerCollectionItemNameAttribute(string collectionItemName)
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.collectionItemName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ContentSerializerCollectionItemNameAttribute(string collectionItemName)
|
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(collectionItemName))
|
if (string.IsNullOrEmpty(collectionItemName))
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("collectionItemName");
|
throw new ArgumentNullException("collectionItemName");
|
||||||
}
|
}
|
||||||
this.collectionItemName = collectionItemName;
|
this.CollectionItemName = collectionItemName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,8 +10,10 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
|
|
||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
|
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
|
||||||
|
[PercentageComplete(100)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public sealed class ContentSerializerIgnoreAttribute : Attribute
|
public sealed class ContentSerializerIgnoreAttribute : Attribute
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -11,14 +11,12 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
|
||||||
|
[PercentageComplete(100)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public sealed class ContentSerializerRuntimeTypeAttribute : Attribute
|
public sealed class ContentSerializerRuntimeTypeAttribute : Attribute
|
||||||
{
|
{
|
||||||
public string RuntimeType
|
public string RuntimeType { get; private set; }
|
||||||
{
|
|
||||||
get;
|
|
||||||
private set;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ContentSerializerRuntimeTypeAttribute(string runtimeType)
|
public ContentSerializerRuntimeTypeAttribute(string runtimeType)
|
||||||
{
|
{
|
||||||
|
@ -11,15 +11,13 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
|
||||||
|
[PercentageComplete(100)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public sealed class ContentSerializerTypeVersionAttribute : Attribute
|
public sealed class ContentSerializerTypeVersionAttribute : Attribute
|
||||||
{
|
{
|
||||||
public int TypeVersion
|
public int TypeVersion { get; private set; }
|
||||||
{
|
|
||||||
get;
|
|
||||||
private set;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ContentSerializerTypeVersionAttribute(int typeVersion)
|
public ContentSerializerTypeVersionAttribute(int typeVersion)
|
||||||
{
|
{
|
||||||
this.TypeVersion = typeVersion;
|
this.TypeVersion = typeVersion;
|
||||||
|
@ -13,6 +13,7 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public sealed class ContentTypeReaderManager
|
public sealed class ContentTypeReaderManager
|
||||||
{
|
{
|
||||||
private ContentReader contentReader;
|
private ContentReader contentReader;
|
||||||
|
@ -12,7 +12,9 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
|
|
||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public class EffectMaterialReader : ContentTypeReader<EffectMaterial>
|
public class EffectMaterialReader : ContentTypeReader<EffectMaterial>
|
||||||
{
|
{
|
||||||
protected internal override EffectMaterial Read(ContentReader input, EffectMaterial existingInstance)
|
protected internal override EffectMaterial Read(ContentReader input, EffectMaterial existingInstance)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using ANX.Framework.ContentPipeline;
|
|
||||||
using ANX.Framework.Graphics;
|
using ANX.Framework.Graphics;
|
||||||
using ANX.Framework.NonXNA;
|
using ANX.Framework.NonXNA;
|
||||||
using ANX.Framework.NonXNA.Development;
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
using ANX.Framework.NonXNA.RenderSystem;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
using ANX.Framework.Graphics;
|
using ANX.Framework.Graphics;
|
||||||
using ANX.Framework.NonXNA.Development;
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
// This file is part of the ANX.Framework created by the
|
// This file is part of the ANX.Framework created by the
|
||||||
@ -11,7 +10,9 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
|
|
||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public class IndexBufferReader : ContentTypeReader<IndexBuffer>
|
public class IndexBufferReader : ContentTypeReader<IndexBuffer>
|
||||||
{
|
{
|
||||||
protected internal override IndexBuffer Read(ContentReader input, IndexBuffer existingInstance)
|
protected internal override IndexBuffer Read(ContentReader input, IndexBuffer existingInstance)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
using ANX.Framework.Graphics;
|
using ANX.Framework.Graphics;
|
||||||
using ANX.Framework.NonXNA;
|
|
||||||
using ANX.Framework.NonXNA.Development;
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
@ -12,25 +11,13 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
|
|
||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public class ModelReader : ContentTypeReader<Model>
|
public class ModelReader : ContentTypeReader<Model>
|
||||||
{
|
{
|
||||||
protected internal override Model Read(ContentReader input, Model existingInstance)
|
protected internal override Model Read(ContentReader input, Model existingInstance)
|
||||||
{
|
{
|
||||||
IServiceProvider service = input.ContentManager.ServiceProvider;
|
|
||||||
|
|
||||||
var rfc = service.GetService(typeof(IRenderSystemCreator)) as IRenderSystemCreator;
|
|
||||||
if (rfc == null)
|
|
||||||
{
|
|
||||||
throw new ContentLoadException("Service not found IRenderFrameworkCreator");
|
|
||||||
}
|
|
||||||
|
|
||||||
var gds = service.GetService(typeof(IGraphicsDeviceService)) as IGraphicsDeviceService;
|
|
||||||
if (gds == null)
|
|
||||||
{
|
|
||||||
throw new ContentLoadException("Service not found IGraphicsDeviceService");
|
|
||||||
}
|
|
||||||
|
|
||||||
ModelBoneCollection bones = ReadBones(input);
|
ModelBoneCollection bones = ReadBones(input);
|
||||||
ModelMeshCollection meshes = ReadMeshes(input, bones);
|
ModelMeshCollection meshes = ReadMeshes(input, bones);
|
||||||
ModelBone rootBone = ReadBoneReference(input, bones);
|
ModelBone rootBone = ReadBoneReference(input, bones);
|
||||||
@ -69,15 +56,7 @@ namespace ANX.Framework.Content
|
|||||||
|
|
||||||
private int ReadBoneIndex(ContentReader reader, int bones)
|
private int ReadBoneIndex(ContentReader reader, int bones)
|
||||||
{
|
{
|
||||||
int index = 0;
|
int index = bones < 255 ? reader.ReadByte() : reader.ReadInt32();
|
||||||
if (bones < 255)
|
|
||||||
{
|
|
||||||
index = (int)reader.ReadByte();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
index = (int)reader.ReadInt32();
|
|
||||||
}
|
|
||||||
return index - 1;
|
return index - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,9 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
|
|
||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public class SkinnedEffectReader : ContentTypeReader<SkinnedEffect>
|
public class SkinnedEffectReader : ContentTypeReader<SkinnedEffect>
|
||||||
{
|
{
|
||||||
protected internal override SkinnedEffect Read(ContentReader input, SkinnedEffect existingInstance)
|
protected internal override SkinnedEffect Read(ContentReader input, SkinnedEffect existingInstance)
|
||||||
|
@ -13,6 +13,7 @@ namespace ANX.Framework.Content
|
|||||||
#if !WINDOWSMETRO
|
#if !WINDOWSMETRO
|
||||||
|
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public class ReflectiveReader<T> : ContentTypeReader
|
public class ReflectiveReader<T> : ContentTypeReader
|
||||||
{
|
{
|
||||||
private int typeVersion;
|
private int typeVersion;
|
||||||
|
@ -9,13 +9,14 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
|
|
||||||
namespace ANX.Framework.Content
|
namespace ANX.Framework.Content
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(80)]
|
||||||
[Developer("GinieDP")]
|
[Developer("GinieDP")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public class ResourceContentManager : ContentManager
|
public class ResourceContentManager : ContentManager
|
||||||
{
|
{
|
||||||
private ResourceManager resource;
|
private readonly ResourceManager resource;
|
||||||
|
|
||||||
public ResourceContentManager(IServiceProvider servicesProvider,
|
public ResourceContentManager(IServiceProvider servicesProvider, ResourceManager resource)
|
||||||
ResourceManager resource)
|
|
||||||
: base(servicesProvider)
|
: base(servicesProvider)
|
||||||
{
|
{
|
||||||
if (resource == null)
|
if (resource == null)
|
||||||
|
@ -10,7 +10,7 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
|
|
||||||
namespace ANX.Framework.Graphics
|
namespace ANX.Framework.Graphics
|
||||||
{
|
{
|
||||||
[PercentageComplete(70)]
|
[PercentageComplete(100)]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public class RenderTarget2D : Texture2D, IDynamicGraphicsResource
|
public class RenderTarget2D : Texture2D, IDynamicGraphicsResource
|
||||||
{
|
{
|
||||||
@ -90,18 +90,16 @@ namespace ANX.Framework.Graphics
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
protected override void Dispose([MarshalAs(UnmanagedType.U1)] bool disposeManaged)
|
protected override void Dispose([MarshalAs(UnmanagedType.U1)] bool disposeManaged)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
base.Dispose(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IDynamicGraphicsResource.SetContentLost(bool isContentLost)
|
void IDynamicGraphicsResource.SetContentLost(bool isContentLost)
|
||||||
{
|
{
|
||||||
this.IsContentLost = isContentLost;
|
this.IsContentLost = isContentLost;
|
||||||
if (isContentLost)
|
if (isContentLost)
|
||||||
raise_ContentLost(this, EventArgs.Empty);
|
raise_ContentLost(this, EventArgs.Empty);
|
||||||
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void raise_ContentLost(object sender, EventArgs args)
|
protected void raise_ContentLost(object sender, EventArgs args)
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
#region Using Statements
|
using ANX.Framework.NonXNA.Development;
|
||||||
using System;
|
|
||||||
|
|
||||||
#endregion // Using Statements
|
|
||||||
|
|
||||||
// This file is part of the ANX.Framework created by the
|
// This file is part of the ANX.Framework created by the
|
||||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||||
// For details see: http://anxframework.codeplex.com/license
|
// For details see: http://anxframework.codeplex.com/license
|
||||||
|
|
||||||
namespace ANX.Framework.ContentPipeline
|
namespace ANX.Framework.NonXNA.RenderSystem
|
||||||
{
|
{
|
||||||
|
[Developer("Glatzemann")]
|
||||||
public enum EffectProcessorOutputFormat : byte
|
public enum EffectProcessorOutputFormat : byte
|
||||||
{
|
{
|
||||||
XNA_BYTE_CODE = 0,
|
XNA_BYTE_CODE = 0,
|
||||||
|
@ -246,7 +246,12 @@ namespace ANX.RenderSystem.GL3
|
|||||||
#region DrawIndexedPrimitives
|
#region DrawIndexedPrimitives
|
||||||
public void DrawIndexedPrimitives(PrimitiveType primitiveType, int baseVertex, int minVertexIndex, int numVertices,
|
public void DrawIndexedPrimitives(PrimitiveType primitiveType, int baseVertex, int minVertexIndex, int numVertices,
|
||||||
int startIndex, int primitiveCount, IndexBuffer indexBuffer)
|
int startIndex, int primitiveCount, IndexBuffer indexBuffer)
|
||||||
{
|
{
|
||||||
|
if (indexBuffer != null)
|
||||||
|
{
|
||||||
|
SetIndexBuffer(indexBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: baseVertex, minVertexIndex, numVertices, startIndex
|
// TODO: baseVertex, minVertexIndex, numVertices, startIndex
|
||||||
DrawElementsType elementsType = boundIndexBuffer.elementSize == IndexElementSize.SixteenBits ?
|
DrawElementsType elementsType = boundIndexBuffer.elementSize == IndexElementSize.SixteenBits ?
|
||||||
DrawElementsType.UnsignedShort :
|
DrawElementsType.UnsignedShort :
|
||||||
@ -264,7 +269,12 @@ namespace ANX.RenderSystem.GL3
|
|||||||
public void DrawInstancedPrimitives(PrimitiveType primitiveType,
|
public void DrawInstancedPrimitives(PrimitiveType primitiveType,
|
||||||
int baseVertex, int minVertexIndex, int numVertices, int startIndex,
|
int baseVertex, int minVertexIndex, int numVertices, int startIndex,
|
||||||
int primitiveCount, int instanceCount, IndexBuffer indexBuffer)
|
int primitiveCount, int instanceCount, IndexBuffer indexBuffer)
|
||||||
{
|
{
|
||||||
|
if (indexBuffer != null)
|
||||||
|
{
|
||||||
|
SetIndexBuffer(indexBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
//GL.DrawArraysInstanced(
|
//GL.DrawArraysInstanced(
|
||||||
// DatatypesMapping.PrimitiveTypeToBeginMode(primitiveType),
|
// DatatypesMapping.PrimitiveTypeToBeginMode(primitiveType),
|
||||||
// baseVertex, numVertices, instanceCount);
|
// baseVertex, numVertices, instanceCount);
|
||||||
|
@ -60,49 +60,190 @@ namespace ANX.Framework.GL3
|
|||||||
#region AlphaTestEffectShader
|
#region AlphaTestEffectShader
|
||||||
internal static byte[] AlphaTestEffectByteCode = new byte[]
|
internal static byte[] AlphaTestEffectByteCode = new byte[]
|
||||||
{
|
{
|
||||||
187, 004, 118, 101, 114, 116, 101, 120, 115, 104, 097, 100, 101, 114, 115,
|
254, 020, 118, 101, 114, 116, 101, 120, 103, 108, 111, 098, 097, 108, 123,
|
||||||
123, 115, 104, 097, 100, 101, 114, 032, 034, 083, 112, 114, 105, 116, 101,
|
117, 110, 105, 102, 111, 114, 109, 032, 118, 101, 099, 052, 032, 068, 105,
|
||||||
086, 101, 114, 116, 101, 120, 083, 104, 097, 100, 101, 114, 034, 123, 117,
|
102, 102, 117, 115, 101, 067, 111, 108, 111, 114, 059, 117, 110, 105, 102,
|
||||||
110, 105, 102, 111, 114, 109, 032, 109, 097, 116, 052, 032, 077, 097, 116,
|
111, 114, 109, 032, 109, 097, 116, 052, 032, 087, 111, 114, 108, 100, 086,
|
||||||
114, 105, 120, 084, 114, 097, 110, 115, 102, 111, 114, 109, 059, 097, 116,
|
105, 101, 119, 080, 114, 111, 106, 059, 117, 110, 105, 102, 111, 114, 109,
|
||||||
116, 114, 105, 098, 117, 116, 101, 032, 118, 101, 099, 052, 032, 112, 111,
|
032, 118, 101, 099, 052, 032, 070, 111, 103, 086, 101, 099, 116, 111, 114,
|
||||||
115, 059, 097, 116, 116, 114, 105, 098, 117, 116, 101, 032, 118, 101, 099,
|
059, 097, 116, 116, 114, 105, 098, 117, 116, 101, 032, 118, 101, 099, 052,
|
||||||
052, 032, 099, 111, 108, 059, 097, 116, 116, 114, 105, 098, 117, 116, 101,
|
032, 112, 111, 115, 059, 097, 116, 116, 114, 105, 098, 117, 116, 101, 032,
|
||||||
032, 118, 101, 099, 050, 032, 116, 101, 120, 059, 118, 097, 114, 121, 105,
|
118, 101, 099, 052, 032, 099, 111, 108, 059, 097, 116, 116, 114, 105, 098,
|
||||||
110, 103, 032, 118, 101, 099, 052, 032, 100, 105, 102, 102, 117, 115, 101,
|
117, 116, 101, 032, 118, 101, 099, 050, 032, 116, 101, 120, 059, 118, 097,
|
||||||
067, 111, 108, 111, 114, 059, 118, 097, 114, 121, 105, 110, 103, 032, 118,
|
114, 121, 105, 110, 103, 032, 118, 101, 099, 050, 032, 100, 105, 102, 102,
|
||||||
101, 099, 050, 032, 100, 105, 102, 102, 117, 115, 101, 084, 101, 120, 067,
|
117, 115, 101, 084, 101, 120, 067, 111, 111, 114, 100, 059, 118, 097, 114,
|
||||||
111, 111, 114, 100, 059, 118, 111, 105, 100, 032, 109, 097, 105, 110, 040,
|
|
||||||
032, 041, 123, 103, 108, 095, 080, 111, 115, 105, 116, 105, 111, 110, 061,
|
|
||||||
077, 097, 116, 114, 105, 120, 084, 114, 097, 110, 115, 102, 111, 114, 109,
|
|
||||||
042, 112, 111, 115, 059, 100, 105, 102, 102, 117, 115, 101, 084, 101, 120,
|
|
||||||
067, 111, 111, 114, 100, 061, 116, 101, 120, 059, 100, 105, 102, 102, 117,
|
|
||||||
115, 101, 067, 111, 108, 111, 114, 061, 099, 111, 108, 059, 125, 125, 125,
|
|
||||||
102, 114, 097, 103, 109, 101, 110, 116, 115, 104, 097, 100, 101, 114, 115,
|
|
||||||
123, 115, 104, 097, 100, 101, 114, 032, 034, 083, 112, 114, 105, 116, 101,
|
|
||||||
070, 114, 097, 103, 109, 101, 110, 116, 083, 104, 097, 100, 101, 114, 034,
|
|
||||||
123, 117, 110, 105, 102, 111, 114, 109, 032, 115, 097, 109, 112, 108, 101,
|
|
||||||
114, 050, 068, 032, 084, 101, 120, 116, 117, 114, 101, 059, 118, 097, 114,
|
|
||||||
121, 105, 110, 103, 032, 118, 101, 099, 052, 032, 100, 105, 102, 102, 117,
|
121, 105, 110, 103, 032, 118, 101, 099, 052, 032, 100, 105, 102, 102, 117,
|
||||||
115, 101, 067, 111, 108, 111, 114, 059, 118, 097, 114, 121, 105, 110, 103,
|
115, 101, 067, 111, 108, 111, 114, 059, 118, 097, 114, 121, 105, 110, 103,
|
||||||
032, 118, 101, 099, 050, 032, 100, 105, 102, 102, 117, 115, 101, 084, 101,
|
032, 118, 101, 099, 052, 032, 115, 112, 101, 099, 117, 108, 097, 114, 059,
|
||||||
120, 067, 111, 111, 114, 100, 059, 118, 111, 105, 100, 032, 109, 097, 105,
|
125, 118, 101, 114, 116, 101, 120, 115, 104, 097, 100, 101, 114, 115, 123,
|
||||||
110, 040, 032, 041, 123, 103, 108, 095, 070, 114, 097, 103, 067, 111, 108,
|
115, 104, 097, 100, 101, 114, 032, 034, 086, 083, 065, 108, 112, 104, 097,
|
||||||
111, 114, 061, 116, 101, 120, 116, 117, 114, 101, 050, 068, 040, 084, 101,
|
084, 101, 115, 116, 034, 123, 118, 111, 105, 100, 032, 109, 097, 105, 110,
|
||||||
120, 116, 117, 114, 101, 044, 100, 105, 102, 102, 117, 115, 101, 084, 101,
|
040, 032, 041, 123, 103, 108, 095, 080, 111, 115, 105, 116, 105, 111, 110,
|
||||||
120, 067, 111, 111, 114, 100, 041, 042, 100, 105, 102, 102, 117, 115, 101,
|
061, 087, 111, 114, 108, 100, 086, 105, 101, 119, 080, 114, 111, 106, 042,
|
||||||
067, 111, 108, 111, 114, 059, 125, 125, 125, 116, 101, 099, 104, 110, 105,
|
112, 111, 115, 059, 100, 105, 102, 102, 117, 115, 101, 084, 101, 120, 067,
|
||||||
113, 117, 101, 115, 123, 116, 101, 099, 104, 110, 105, 113, 117, 101, 032,
|
111, 111, 114, 100, 061, 116, 101, 120, 059, 100, 105, 102, 102, 117, 115,
|
||||||
034, 083, 112, 114, 105, 116, 101, 084, 101, 099, 104, 110, 105, 113, 117,
|
101, 067, 111, 108, 111, 114, 061, 068, 105, 102, 102, 117, 115, 101, 067,
|
||||||
101, 034, 123, 118, 101, 114, 116, 101, 120, 032, 034, 083, 112, 114, 105,
|
111, 108, 111, 114, 059, 115, 112, 101, 099, 117, 108, 097, 114, 061, 118,
|
||||||
116, 101, 086, 101, 114, 116, 101, 120, 083, 104, 097, 100, 101, 114, 034,
|
101, 099, 052, 040, 048, 044, 048, 044, 048, 044, 115, 097, 116, 117, 114,
|
||||||
102, 114, 097, 103, 109, 101, 110, 116, 032, 034, 083, 112, 114, 105, 116,
|
097, 116, 101, 040, 100, 111, 116, 040, 112, 111, 115, 044, 070, 111, 103,
|
||||||
101, 070, 114, 097, 103, 109, 101, 110, 116, 083, 104, 097, 100, 101, 114,
|
086, 101, 099, 116, 111, 114, 041, 041, 041, 059, 125, 125, 115, 104, 097,
|
||||||
034, 125, 125, 085, 005, 093, 183, 066, 090, 070, 104, 093, 184, 253, 199,
|
100, 101, 114, 032, 034, 086, 083, 065, 108, 112, 104, 097, 084, 101, 115,
|
||||||
246, 081, 152, 083, 013, 048, 171, 074, 063, 021, 247, 182, 129, 011, 094,
|
116, 078, 111, 070, 111, 103, 034, 123, 118, 111, 105, 100, 032, 109, 097,
|
||||||
003, 189, 026, 178, 121, 230, 157, 193, 056, 001, 064, 136, 044, 054, 172,
|
105, 110, 040, 032, 041, 123, 103, 108, 095, 080, 111, 115, 105, 116, 105,
|
||||||
146, 241, 173, 160, 182, 034, 092, 221, 158, 045, 049, 229, 144, 171, 015,
|
111, 110, 061, 087, 111, 114, 108, 100, 086, 105, 101, 119, 080, 114, 111,
|
||||||
022, 089, 025, 248, 163, 175, 081
|
106, 042, 112, 111, 115, 059, 100, 105, 102, 102, 117, 115, 101, 084, 101,
|
||||||
|
120, 067, 111, 111, 114, 100, 061, 116, 101, 120, 059, 100, 105, 102, 102,
|
||||||
|
117, 115, 101, 067, 111, 108, 111, 114, 061, 068, 105, 102, 102, 117, 115,
|
||||||
|
101, 067, 111, 108, 111, 114, 059, 125, 125, 115, 104, 097, 100, 101, 114,
|
||||||
|
032, 034, 086, 083, 065, 108, 112, 104, 097, 084, 101, 115, 116, 086, 101,
|
||||||
|
114, 116, 101, 120, 067, 111, 108, 111, 114, 034, 123, 118, 111, 105, 100,
|
||||||
|
032, 109, 097, 105, 110, 040, 032, 041, 123, 103, 108, 095, 080, 111, 115,
|
||||||
|
105, 116, 105, 111, 110, 061, 087, 111, 114, 108, 100, 086, 105, 101, 119,
|
||||||
|
080, 114, 111, 106, 042, 112, 111, 115, 059, 100, 105, 102, 102, 117, 115,
|
||||||
|
101, 084, 101, 120, 067, 111, 111, 114, 100, 061, 116, 101, 120, 059, 100,
|
||||||
|
105, 102, 102, 117, 115, 101, 067, 111, 108, 111, 114, 061, 068, 105, 102,
|
||||||
|
102, 117, 115, 101, 067, 111, 108, 111, 114, 042, 099, 111, 108, 059, 115,
|
||||||
|
112, 101, 099, 117, 108, 097, 114, 061, 118, 101, 099, 052, 040, 048, 044,
|
||||||
|
048, 044, 048, 044, 115, 097, 116, 117, 114, 097, 116, 101, 040, 100, 111,
|
||||||
|
116, 040, 112, 111, 115, 044, 070, 111, 103, 086, 101, 099, 116, 111, 114,
|
||||||
|
041, 041, 041, 059, 125, 125, 115, 104, 097, 100, 101, 114, 032, 034, 086,
|
||||||
|
083, 065, 108, 112, 104, 097, 084, 101, 115, 116, 086, 101, 114, 116, 101,
|
||||||
|
120, 067, 111, 108, 111, 114, 078, 111, 070, 111, 103, 034, 123, 118, 111,
|
||||||
|
105, 100, 032, 109, 097, 105, 110, 040, 032, 041, 123, 103, 108, 095, 080,
|
||||||
|
111, 115, 105, 116, 105, 111, 110, 061, 087, 111, 114, 108, 100, 086, 105,
|
||||||
|
101, 119, 080, 114, 111, 106, 042, 112, 111, 115, 059, 100, 105, 102, 102,
|
||||||
|
117, 115, 101, 084, 101, 120, 067, 111, 111, 114, 100, 061, 116, 101, 120,
|
||||||
|
059, 100, 105, 102, 102, 117, 115, 101, 067, 111, 108, 111, 114, 061, 068,
|
||||||
|
105, 102, 102, 117, 115, 101, 067, 111, 108, 111, 114, 042, 099, 111, 108,
|
||||||
|
059, 125, 125, 125, 102, 114, 097, 103, 109, 101, 110, 116, 103, 108, 111,
|
||||||
|
098, 097, 108, 123, 117, 110, 105, 102, 111, 114, 109, 032, 115, 097, 109,
|
||||||
|
112, 108, 101, 114, 050, 068, 032, 084, 101, 120, 116, 117, 114, 101, 059,
|
||||||
|
117, 110, 105, 102, 111, 114, 109, 032, 118, 101, 099, 052, 032, 065, 108,
|
||||||
|
112, 104, 097, 084, 101, 115, 116, 059, 117, 110, 105, 102, 111, 114, 109,
|
||||||
|
032, 118, 101, 099, 051, 032, 070, 111, 103, 067, 111, 108, 111, 114, 059,
|
||||||
|
118, 097, 114, 121, 105, 110, 103, 032, 118, 101, 099, 050, 032, 100, 105,
|
||||||
|
102, 102, 117, 115, 101, 084, 101, 120, 067, 111, 111, 114, 100, 059, 118,
|
||||||
|
097, 114, 121, 105, 110, 103, 032, 118, 101, 099, 052, 032, 100, 105, 102,
|
||||||
|
102, 117, 115, 101, 067, 111, 108, 111, 114, 059, 118, 097, 114, 121, 105,
|
||||||
|
110, 103, 032, 118, 101, 099, 052, 032, 115, 112, 101, 099, 117, 108, 097,
|
||||||
|
114, 059, 125, 102, 114, 097, 103, 109, 101, 110, 116, 115, 104, 097, 100,
|
||||||
|
101, 114, 115, 123, 115, 104, 097, 100, 101, 114, 032, 034, 080, 083, 065,
|
||||||
|
108, 112, 104, 097, 084, 101, 115, 116, 076, 116, 071, 116, 034, 123, 118,
|
||||||
|
111, 105, 100, 032, 109, 097, 105, 110, 040, 032, 041, 123, 118, 101, 099,
|
||||||
|
052, 032, 099, 111, 108, 111, 114, 061, 116, 101, 120, 116, 117, 114, 101,
|
||||||
|
050, 068, 040, 084, 101, 120, 116, 117, 114, 101, 044, 100, 105, 102, 102,
|
||||||
|
117, 115, 101, 084, 101, 120, 067, 111, 111, 114, 100, 041, 042, 100, 105,
|
||||||
|
102, 102, 117, 115, 101, 067, 111, 108, 111, 114, 059, 105, 102, 040, 040,
|
||||||
|
040, 097, 098, 115, 040, 099, 111, 108, 111, 114, 046, 097, 045, 065, 108,
|
||||||
|
112, 104, 097, 084, 101, 115, 116, 046, 120, 041, 032, 060, 032, 065, 108,
|
||||||
|
112, 104, 097, 084, 101, 115, 116, 046, 121, 041, 032, 063, 032, 065, 108,
|
||||||
|
112, 104, 097, 084, 101, 115, 116, 046, 122, 032, 058, 032, 065, 108, 112,
|
||||||
|
104, 097, 084, 101, 115, 116, 046, 119, 041, 032, 060, 032, 048, 041, 100,
|
||||||
|
105, 115, 099, 097, 114, 100, 059, 099, 111, 108, 111, 114, 046, 114, 103,
|
||||||
|
098, 061, 109, 105, 120, 040, 099, 111, 108, 111, 114, 046, 114, 103, 098,
|
||||||
|
044, 070, 111, 103, 067, 111, 108, 111, 114, 042, 099, 111, 108, 111, 114,
|
||||||
|
046, 097, 044, 115, 112, 101, 099, 117, 108, 097, 114, 046, 119, 041, 059,
|
||||||
|
103, 108, 095, 070, 114, 097, 103, 067, 111, 108, 111, 114, 061, 099, 111,
|
||||||
|
108, 111, 114, 059, 125, 125, 115, 104, 097, 100, 101, 114, 032, 034, 080,
|
||||||
|
083, 065, 108, 112, 104, 097, 084, 101, 115, 116, 076, 116, 071, 116, 078,
|
||||||
|
111, 070, 111, 103, 034, 123, 118, 111, 105, 100, 032, 109, 097, 105, 110,
|
||||||
|
040, 032, 041, 123, 118, 101, 099, 052, 032, 099, 111, 108, 111, 114, 061,
|
||||||
|
116, 101, 120, 116, 117, 114, 101, 050, 068, 040, 084, 101, 120, 116, 117,
|
||||||
|
114, 101, 044, 100, 105, 102, 102, 117, 115, 101, 084, 101, 120, 067, 111,
|
||||||
|
111, 114, 100, 041, 042, 100, 105, 102, 102, 117, 115, 101, 067, 111, 108,
|
||||||
|
111, 114, 059, 105, 102, 040, 040, 040, 097, 098, 115, 040, 099, 111, 108,
|
||||||
|
111, 114, 046, 097, 045, 065, 108, 112, 104, 097, 084, 101, 115, 116, 046,
|
||||||
|
120, 041, 032, 060, 032, 065, 108, 112, 104, 097, 084, 101, 115, 116, 046,
|
||||||
|
121, 041, 032, 063, 032, 065, 108, 112, 104, 097, 084, 101, 115, 116, 046,
|
||||||
|
122, 032, 058, 032, 065, 108, 112, 104, 097, 084, 101, 115, 116, 046, 119,
|
||||||
|
041, 032, 060, 032, 048, 041, 100, 105, 115, 099, 097, 114, 100, 059, 103,
|
||||||
|
108, 095, 070, 114, 097, 103, 067, 111, 108, 111, 114, 061, 099, 111, 108,
|
||||||
|
111, 114, 059, 125, 125, 115, 104, 097, 100, 101, 114, 032, 034, 080, 083,
|
||||||
|
065, 108, 112, 104, 097, 084, 101, 115, 116, 069, 113, 078, 101, 034, 123,
|
||||||
|
118, 111, 105, 100, 032, 109, 097, 105, 110, 040, 032, 041, 123, 118, 101,
|
||||||
|
099, 052, 032, 099, 111, 108, 111, 114, 061, 116, 101, 120, 116, 117, 114,
|
||||||
|
101, 050, 068, 040, 084, 101, 120, 116, 117, 114, 101, 044, 100, 105, 102,
|
||||||
|
102, 117, 115, 101, 084, 101, 120, 067, 111, 111, 114, 100, 041, 042, 100,
|
||||||
|
105, 102, 102, 117, 115, 101, 067, 111, 108, 111, 114, 059, 105, 102, 040,
|
||||||
|
040, 040, 097, 098, 115, 040, 099, 111, 108, 111, 114, 046, 097, 045, 065,
|
||||||
|
108, 112, 104, 097, 084, 101, 115, 116, 046, 120, 041, 032, 060, 032, 065,
|
||||||
|
108, 112, 104, 097, 084, 101, 115, 116, 046, 121, 041, 032, 063, 032, 065,
|
||||||
|
108, 112, 104, 097, 084, 101, 115, 116, 046, 122, 032, 058, 032, 065, 108,
|
||||||
|
112, 104, 097, 084, 101, 115, 116, 046, 119, 041, 032, 060, 032, 048, 041,
|
||||||
|
100, 105, 115, 099, 097, 114, 100, 059, 099, 111, 108, 111, 114, 046, 114,
|
||||||
|
103, 098, 061, 109, 105, 120, 040, 099, 111, 108, 111, 114, 046, 114, 103,
|
||||||
|
098, 044, 070, 111, 103, 067, 111, 108, 111, 114, 042, 099, 111, 108, 111,
|
||||||
|
114, 046, 097, 044, 115, 112, 101, 099, 117, 108, 097, 114, 046, 119, 041,
|
||||||
|
059, 103, 108, 095, 070, 114, 097, 103, 067, 111, 108, 111, 114, 061, 099,
|
||||||
|
111, 108, 111, 114, 059, 125, 125, 115, 104, 097, 100, 101, 114, 032, 034,
|
||||||
|
080, 083, 065, 108, 112, 104, 097, 084, 101, 115, 116, 069, 113, 078, 101,
|
||||||
|
078, 111, 070, 111, 103, 034, 123, 118, 111, 105, 100, 032, 109, 097, 105,
|
||||||
|
110, 040, 032, 041, 123, 118, 101, 099, 052, 032, 099, 111, 108, 111, 114,
|
||||||
|
061, 116, 101, 120, 116, 117, 114, 101, 050, 068, 040, 084, 101, 120, 116,
|
||||||
|
117, 114, 101, 044, 100, 105, 102, 102, 117, 115, 101, 084, 101, 120, 067,
|
||||||
|
111, 111, 114, 100, 041, 042, 100, 105, 102, 102, 117, 115, 101, 067, 111,
|
||||||
|
108, 111, 114, 059, 105, 102, 040, 040, 040, 097, 098, 115, 040, 099, 111,
|
||||||
|
108, 111, 114, 046, 097, 045, 065, 108, 112, 104, 097, 084, 101, 115, 116,
|
||||||
|
046, 120, 041, 032, 060, 032, 065, 108, 112, 104, 097, 084, 101, 115, 116,
|
||||||
|
046, 121, 041, 032, 063, 032, 065, 108, 112, 104, 097, 084, 101, 115, 116,
|
||||||
|
046, 122, 032, 058, 032, 065, 108, 112, 104, 097, 084, 101, 115, 116, 046,
|
||||||
|
119, 041, 032, 060, 032, 048, 041, 100, 105, 115, 099, 097, 114, 100, 059,
|
||||||
|
103, 108, 095, 070, 114, 097, 103, 067, 111, 108, 111, 114, 061, 099, 111,
|
||||||
|
108, 111, 114, 059, 125, 125, 125, 116, 101, 099, 104, 110, 105, 113, 117,
|
||||||
|
101, 115, 123, 116, 101, 099, 104, 110, 105, 113, 117, 101, 032, 034, 065,
|
||||||
|
108, 112, 104, 097, 084, 101, 115, 116, 076, 116, 071, 116, 034, 123, 118,
|
||||||
|
101, 114, 116, 101, 120, 032, 034, 086, 083, 065, 108, 112, 104, 097, 084,
|
||||||
|
101, 115, 116, 034, 059, 102, 114, 097, 103, 109, 101, 110, 116, 032, 034,
|
||||||
|
080, 083, 065, 108, 112, 104, 097, 084, 101, 115, 116, 076, 116, 071, 116,
|
||||||
|
034, 059, 125, 116, 101, 099, 104, 110, 105, 113, 117, 101, 032, 034, 065,
|
||||||
|
108, 112, 104, 097, 084, 101, 115, 116, 078, 111, 070, 111, 103, 076, 116,
|
||||||
|
071, 116, 034, 123, 118, 101, 114, 116, 101, 120, 032, 034, 086, 083, 065,
|
||||||
|
108, 112, 104, 097, 084, 101, 115, 116, 078, 111, 070, 111, 103, 034, 102,
|
||||||
|
114, 097, 103, 109, 101, 110, 116, 032, 034, 080, 083, 065, 108, 112, 104,
|
||||||
|
097, 084, 101, 115, 116, 076, 116, 071, 116, 078, 111, 070, 111, 103, 034,
|
||||||
|
125, 116, 101, 099, 104, 110, 105, 113, 117, 101, 032, 034, 065, 108, 112,
|
||||||
|
104, 097, 084, 101, 115, 116, 086, 101, 114, 116, 101, 120, 067, 111, 108,
|
||||||
|
111, 114, 076, 116, 071, 116, 034, 123, 118, 101, 114, 116, 101, 120, 032,
|
||||||
|
034, 086, 083, 065, 108, 112, 104, 097, 084, 101, 115, 116, 086, 101, 114,
|
||||||
|
116, 101, 120, 067, 111, 108, 111, 114, 034, 102, 114, 097, 103, 109, 101,
|
||||||
|
110, 116, 032, 034, 080, 083, 065, 108, 112, 104, 097, 084, 101, 115, 116,
|
||||||
|
076, 116, 071, 116, 034, 125, 116, 101, 099, 104, 110, 105, 113, 117, 101,
|
||||||
|
032, 034, 065, 108, 112, 104, 097, 084, 101, 115, 116, 086, 101, 114, 116,
|
||||||
|
101, 120, 067, 111, 108, 111, 114, 078, 111, 070, 111, 103, 076, 116, 071,
|
||||||
|
116, 034, 123, 118, 101, 114, 116, 101, 120, 032, 034, 086, 083, 065, 108,
|
||||||
|
112, 104, 097, 084, 101, 115, 116, 086, 101, 114, 116, 101, 120, 067, 111,
|
||||||
|
108, 111, 114, 078, 111, 070, 111, 103, 034, 102, 114, 097, 103, 109, 101,
|
||||||
|
110, 116, 032, 034, 080, 083, 065, 108, 112, 104, 097, 084, 101, 115, 116,
|
||||||
|
076, 116, 071, 116, 078, 111, 070, 111, 103, 034, 125, 116, 101, 099, 104,
|
||||||
|
110, 105, 113, 117, 101, 032, 034, 065, 108, 112, 104, 097, 084, 101, 115,
|
||||||
|
116, 069, 113, 078, 101, 034, 123, 118, 101, 114, 116, 101, 120, 032, 034,
|
||||||
|
086, 083, 065, 108, 112, 104, 097, 084, 101, 115, 116, 034, 102, 114, 097,
|
||||||
|
103, 109, 101, 110, 116, 032, 034, 080, 083, 065, 108, 112, 104, 097, 084,
|
||||||
|
101, 115, 116, 069, 113, 078, 101, 034, 125, 116, 101, 099, 104, 110, 105,
|
||||||
|
113, 117, 101, 032, 034, 065, 108, 112, 104, 097, 084, 101, 115, 116, 078,
|
||||||
|
111, 070, 111, 103, 069, 113, 078, 101, 034, 123, 118, 101, 114, 116, 101,
|
||||||
|
120, 032, 034, 086, 083, 065, 108, 112, 104, 097, 084, 101, 115, 116, 078,
|
||||||
|
111, 070, 111, 103, 034, 102, 114, 097, 103, 109, 101, 110, 116, 032, 034,
|
||||||
|
080, 083, 065, 108, 112, 104, 097, 084, 101, 115, 116, 069, 113, 078, 101,
|
||||||
|
078, 111, 070, 111, 103, 034, 125, 116, 101, 099, 104, 110, 105, 113, 117,
|
||||||
|
101, 032, 034, 065, 108, 112, 104, 097, 084, 101, 115, 116, 086, 101, 114,
|
||||||
|
116, 101, 120, 067, 111, 108, 111, 114, 069, 113, 078, 101, 034, 123, 118,
|
||||||
|
101, 114, 116, 101, 120, 032, 034, 086, 083, 065, 108, 112, 104, 097, 084,
|
||||||
|
101, 115, 116, 086, 101, 114, 116, 101, 120, 067, 111, 108, 111, 114, 034,
|
||||||
|
102, 114, 097, 103, 109, 101, 110, 116, 032, 034, 080, 083, 065, 108, 112,
|
||||||
|
104, 097, 084, 101, 115, 116, 069, 113, 078, 101, 034, 125, 116, 101, 099,
|
||||||
|
104, 110, 105, 113, 117, 101, 032, 034, 065, 108, 112, 104, 097, 084, 101,
|
||||||
|
115, 116, 086, 101, 114, 116, 101, 120, 067, 111, 108, 111, 114, 078, 111,
|
||||||
|
070, 111, 103, 069, 113, 078, 101, 034, 123, 118, 101, 114, 116, 101, 120,
|
||||||
|
032, 034, 086, 083, 065, 108, 112, 104, 097, 084, 101, 115, 116, 086, 101,
|
||||||
|
114, 116, 101, 120, 067, 111, 108, 111, 114, 078, 111, 070, 111, 103, 034,
|
||||||
|
102, 114, 097, 103, 109, 101, 110, 116, 032, 034, 080, 083, 065, 108, 112,
|
||||||
|
104, 097, 084, 101, 115, 116, 069, 113, 078, 101, 078, 111, 070, 111, 103,
|
||||||
|
034, 125, 125, 193, 056, 059, 035, 234, 141, 192, 107, 211, 052, 014, 143,
|
||||||
|
102, 144, 054, 000, 204, 207, 103, 231, 232, 152, 090, 168, 195, 202, 210,
|
||||||
|
162, 091, 102, 172, 085, 224, 057, 027, 090, 158, 206, 009, 220, 150, 105,
|
||||||
|
239, 222, 004, 062, 068, 220, 123, 245, 186, 062, 221, 115, 080, 144, 004,
|
||||||
|
124, 076, 234, 063, 132, 204, 155
|
||||||
};
|
};
|
||||||
#endregion //AlphaTestEffectShader
|
#endregion //AlphaTestEffectShader
|
||||||
|
|
||||||
|
@ -105,6 +105,10 @@
|
|||||||
<Project>{068EB2E9-963C-4E1B-8831-E25011F11FFE}</Project>
|
<Project>{068EB2E9-963C-4E1B-8831-E25011F11FFE}</Project>
|
||||||
<Name>ANX.PlatformSystem.Windows</Name>
|
<Name>ANX.PlatformSystem.Windows</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.GL3\ANX.RenderSystem.GL3.csproj">
|
||||||
|
<Project>{EB8258E0-6741-4DB9-B756-1EBDF67B1ED6}</Project>
|
||||||
|
<Name>ANX.RenderSystem.GL3</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.RenderSystem.Windows.DX10</Name>
|
<Name>ANX.RenderSystem.Windows.DX10</Name>
|
||||||
|
@ -103,6 +103,10 @@
|
|||||||
<Project>{068EB2E9-963C-4E1B-8831-E25011F11FFE}</Project>
|
<Project>{068EB2E9-963C-4E1B-8831-E25011F11FFE}</Project>
|
||||||
<Name>ANX.PlatformSystem.Windows</Name>
|
<Name>ANX.PlatformSystem.Windows</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.GL3\ANX.RenderSystem.GL3_Linux.csproj">
|
||||||
|
<Project>{EB8258E0-6741-4DB9-B756-1EBDF67B1ED6}</Project>
|
||||||
|
<Name>ANX.RenderSystem.GL3</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10_Linux.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10_Linux.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.RenderSystem.Windows.DX10</Name>
|
<Name>ANX.RenderSystem.Windows.DX10</Name>
|
||||||
|
@ -103,6 +103,10 @@
|
|||||||
<Project>{068EB2E9-963C-4E1B-8831-E25011F11FFE}</Project>
|
<Project>{068EB2E9-963C-4E1B-8831-E25011F11FFE}</Project>
|
||||||
<Name>ANX.PlatformSystem.Windows</Name>
|
<Name>ANX.PlatformSystem.Windows</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.GL3\ANX.RenderSystem.GL3_PSVita.csproj">
|
||||||
|
<Project>{EB8258E0-6741-4DB9-B756-1EBDF67B1ED6}</Project>
|
||||||
|
<Name>ANX.RenderSystem.GL3</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10_PSVita.csproj">
|
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10_PSVita.csproj">
|
||||||
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
|
||||||
<Name>ANX.RenderSystem.Windows.DX10</Name>
|
<Name>ANX.RenderSystem.Windows.DX10</Name>
|
||||||
|
@ -11,9 +11,9 @@ namespace AlphaTestEffectSample
|
|||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
AddInSystemFactory.Instance.SetPreferredSystem(AddInType.RenderSystem, "DirectX10");
|
AddInSystemFactory.Instance.SetPreferredSystem(AddInType.RenderSystem, "DirectX10");
|
||||||
//AddInSystemFactory.Instance.SetPreferredSystem(AddInType.RenderSystem, "DirectX11");
|
//AddInSystemFactory.Instance.SetPreferredSystem(AddInType.RenderSystem, "DirectX11");
|
||||||
//AddInSystemFactory.Instance.SetPreferredSystem(AddInType.RenderSystem, "OpenGL3");
|
//AddInSystemFactory.Instance.SetPreferredSystem(AddInType.RenderSystem, "OpenGL3");
|
||||||
|
|
||||||
using (Game1 game = new Game1())
|
using (Game1 game = new Game1())
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Diagnostics;
|
|
||||||
|
|
||||||
// This file is part of the ANX.Framework created by the
|
// This file is part of the ANX.Framework created by the
|
||||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||||
@ -22,13 +21,14 @@ namespace StockShaderCodeGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Program.TraceListener.WriteLine("ANX.Framework StockShaderCodeGenerator (sscg) Version " + Assembly.GetExecutingAssembly().GetName().Version);
|
TraceListener.WriteLine("ANX.Framework StockShaderCodeGenerator (sscg) Version " +
|
||||||
|
Assembly.GetExecutingAssembly().GetName().Version);
|
||||||
|
|
||||||
string buildFile;
|
string buildFile;
|
||||||
|
|
||||||
if (args.Length < 1)
|
if (args.Length < 1)
|
||||||
{
|
{
|
||||||
Program.TraceListener.WriteLine("No command line arguments provided. Trying to load build.xml from current directory.");
|
TraceListener.WriteLine("No command line arguments provided. Trying to load build.xml from current directory.");
|
||||||
buildFile = "build.xml";
|
buildFile = "build.xml";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -36,7 +36,7 @@ namespace StockShaderCodeGenerator
|
|||||||
buildFile = args[0];
|
buildFile = args[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
Program.TraceListener.WriteLine("Creating configuration using '{0}' configuration file.", buildFile);
|
TraceListener.WriteLine("Creating configuration using '{0}' configuration file.", buildFile);
|
||||||
|
|
||||||
Configuration.LoadConfiguration(buildFile);
|
Configuration.LoadConfiguration(buildFile);
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ namespace StockShaderCodeGenerator
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Program.TraceListener.WriteLine("error while compiling shaders. Code generation skipped...");
|
TraceListener.WriteLine("error while compiling shaders. Code generation skipped...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,49 +2,173 @@
|
|||||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||||
// For details see: http://anxframework.codeplex.com/license
|
// For details see: http://anxframework.codeplex.com/license
|
||||||
|
|
||||||
//TODO: dummy implementation / placeholder
|
vertexglobal
|
||||||
|
{
|
||||||
|
uniform vec4 DiffuseColor;
|
||||||
|
uniform mat4 WorldViewProj;
|
||||||
|
uniform vec4 FogVector;
|
||||||
|
|
||||||
|
attribute vec4 pos;
|
||||||
|
attribute vec4 col;
|
||||||
|
attribute vec2 tex;
|
||||||
|
|
||||||
|
varying vec2 diffuseTexCoord;
|
||||||
|
varying vec4 diffuseColor;
|
||||||
|
varying vec4 specular;
|
||||||
|
}
|
||||||
|
|
||||||
vertexshaders
|
vertexshaders
|
||||||
{
|
{
|
||||||
shader "SpriteVertexShader"
|
shader "VSAlphaTest"
|
||||||
{
|
{
|
||||||
uniform mat4 MatrixTransform;
|
|
||||||
|
|
||||||
attribute vec4 pos;
|
|
||||||
attribute vec4 col;
|
|
||||||
attribute vec2 tex;
|
|
||||||
|
|
||||||
varying vec4 diffuseColor;
|
|
||||||
varying vec2 diffuseTexCoord;
|
|
||||||
void main( )
|
void main( )
|
||||||
{
|
{
|
||||||
gl_Position = MatrixTransform * pos;
|
gl_Position = WorldViewProj * pos;
|
||||||
diffuseTexCoord = tex;
|
diffuseTexCoord = tex;
|
||||||
diffuseColor = col;
|
diffuseColor = DiffuseColor;
|
||||||
|
specular = vec4(0, 0, 0, saturate(dot(pos, FogVector)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shader "VSAlphaTestNoFog"
|
||||||
|
{
|
||||||
|
void main( )
|
||||||
|
{
|
||||||
|
gl_Position = WorldViewProj * pos;
|
||||||
|
diffuseTexCoord = tex;
|
||||||
|
diffuseColor = DiffuseColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shader "VSAlphaTestVertexColor"
|
||||||
|
{
|
||||||
|
void main( )
|
||||||
|
{
|
||||||
|
gl_Position = WorldViewProj * pos;
|
||||||
|
diffuseTexCoord = tex;
|
||||||
|
diffuseColor = DiffuseColor * col;
|
||||||
|
specular = vec4(0, 0, 0, saturate(dot(pos, FogVector)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shader "VSAlphaTestVertexColorNoFog"
|
||||||
|
{
|
||||||
|
void main( )
|
||||||
|
{
|
||||||
|
gl_Position = WorldViewProj * pos;
|
||||||
|
diffuseTexCoord = tex;
|
||||||
|
diffuseColor = DiffuseColor * col;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fragmentglobal
|
||||||
|
{
|
||||||
|
uniform sampler2D Texture;
|
||||||
|
uniform vec4 AlphaTest;
|
||||||
|
uniform vec3 FogColor;
|
||||||
|
|
||||||
|
varying vec2 diffuseTexCoord;
|
||||||
|
varying vec4 diffuseColor;
|
||||||
|
varying vec4 specular;
|
||||||
|
}
|
||||||
|
|
||||||
fragmentshaders
|
fragmentshaders
|
||||||
{
|
{
|
||||||
shader "SpriteFragmentShader"
|
shader "PSAlphaTestLtGt"
|
||||||
{
|
{
|
||||||
uniform sampler2D Texture;
|
|
||||||
|
|
||||||
varying vec4 diffuseColor;
|
|
||||||
varying vec2 diffuseTexCoord;
|
|
||||||
void main( )
|
void main( )
|
||||||
{
|
{
|
||||||
gl_FragColor = texture2D(Texture, diffuseTexCoord) * diffuseColor;
|
vec4 color = texture2D(Texture, diffuseTexCoord) * diffuseColor;
|
||||||
|
if(((abs(color.a - AlphaTest.x) < AlphaTest.y) ? AlphaTest.z : AlphaTest.w) < 0)
|
||||||
|
discard;
|
||||||
|
color.rgb = mix(color.rgb, FogColor * color.a, specular.w);
|
||||||
|
gl_FragColor = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shader "PSAlphaTestLtGtNoFog"
|
||||||
|
{
|
||||||
|
void main( )
|
||||||
|
{
|
||||||
|
vec4 color = texture2D(Texture, diffuseTexCoord) * diffuseColor;
|
||||||
|
if(((abs(color.a - AlphaTest.x) < AlphaTest.y) ? AlphaTest.z : AlphaTest.w) < 0)
|
||||||
|
discard;
|
||||||
|
gl_FragColor = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shader "PSAlphaTestEqNe"
|
||||||
|
{
|
||||||
|
void main( )
|
||||||
|
{
|
||||||
|
vec4 color = texture2D(Texture, diffuseTexCoord) * diffuseColor;
|
||||||
|
if(((abs(color.a - AlphaTest.x) < AlphaTest.y) ? AlphaTest.z : AlphaTest.w) < 0)
|
||||||
|
discard;
|
||||||
|
color.rgb = mix(color.rgb, FogColor * color.a, specular.w);
|
||||||
|
gl_FragColor = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shader "PSAlphaTestEqNeNoFog"
|
||||||
|
{
|
||||||
|
void main( )
|
||||||
|
{
|
||||||
|
vec4 color = texture2D(Texture, diffuseTexCoord) * diffuseColor;
|
||||||
|
if(((abs(color.a - AlphaTest.x) < AlphaTest.y) ? AlphaTest.z : AlphaTest.w) < 0)
|
||||||
|
discard;
|
||||||
|
gl_FragColor = color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
techniques
|
techniques
|
||||||
{
|
{
|
||||||
technique "SpriteTechnique"
|
technique "AlphaTestLtGt"
|
||||||
{
|
{
|
||||||
vertex "SpriteVertexShader"
|
vertex "VSAlphaTest";
|
||||||
fragment "SpriteFragmentShader"
|
fragment "PSAlphaTestLtGt";
|
||||||
|
}
|
||||||
|
|
||||||
|
technique "AlphaTestNoFogLtGt"
|
||||||
|
{
|
||||||
|
vertex "VSAlphaTestNoFog"
|
||||||
|
fragment "PSAlphaTestLtGtNoFog"
|
||||||
|
}
|
||||||
|
|
||||||
|
technique "AlphaTestVertexColorLtGt"
|
||||||
|
{
|
||||||
|
vertex "VSAlphaTestVertexColor"
|
||||||
|
fragment "PSAlphaTestLtGt"
|
||||||
|
}
|
||||||
|
|
||||||
|
technique "AlphaTestVertexColorNoFogLtGt"
|
||||||
|
{
|
||||||
|
vertex "VSAlphaTestVertexColorNoFog"
|
||||||
|
fragment "PSAlphaTestLtGtNoFog"
|
||||||
|
}
|
||||||
|
|
||||||
|
technique "AlphaTestEqNe"
|
||||||
|
{
|
||||||
|
vertex "VSAlphaTest"
|
||||||
|
fragment "PSAlphaTestEqNe"
|
||||||
|
}
|
||||||
|
|
||||||
|
technique "AlphaTestNoFogEqNe"
|
||||||
|
{
|
||||||
|
vertex "VSAlphaTestNoFog"
|
||||||
|
fragment "PSAlphaTestEqNeNoFog"
|
||||||
|
}
|
||||||
|
|
||||||
|
technique "AlphaTestVertexColorEqNe"
|
||||||
|
{
|
||||||
|
vertex "VSAlphaTestVertexColor"
|
||||||
|
fragment "PSAlphaTestEqNe"
|
||||||
|
}
|
||||||
|
|
||||||
|
technique "AlphaTestVertexColorNoFogEqNe"
|
||||||
|
{
|
||||||
|
vertex "VSAlphaTestVertexColorNoFog"
|
||||||
|
fragment "PSAlphaTestEqNeNoFog"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,7 +6,7 @@ vertexglobal
|
|||||||
{
|
{
|
||||||
uniform vec4 DiffuseColor;
|
uniform vec4 DiffuseColor;
|
||||||
uniform vec4 FogVector;
|
uniform vec4 FogVector;
|
||||||
uniform mat4 WorldViewProj;
|
uniform mat4 WorldViewProj;
|
||||||
}
|
}
|
||||||
|
|
||||||
vertexshaders
|
vertexshaders
|
||||||
@ -24,7 +24,7 @@ vertexshaders
|
|||||||
void main( )
|
void main( )
|
||||||
{
|
{
|
||||||
gl_Position = WorldViewProj * pos;
|
gl_Position = WorldViewProj * pos;
|
||||||
diffuse = DiffuseColor;
|
diffuse = DiffuseColor;
|
||||||
specular = vec4(0, 0, 0, saturate(dot(pos, FogVector)));
|
specular = vec4(0, 0, 0, saturate(dot(pos, FogVector)));
|
||||||
diffuseTexCoord = tex;
|
diffuseTexCoord = tex;
|
||||||
diffuseTexCoord2 = tex2;
|
diffuseTexCoord2 = tex2;
|
||||||
@ -43,7 +43,7 @@ vertexshaders
|
|||||||
void main( )
|
void main( )
|
||||||
{
|
{
|
||||||
gl_Position = WorldViewProj * pos;
|
gl_Position = WorldViewProj * pos;
|
||||||
diffuse = DiffuseColor;
|
diffuse = DiffuseColor;
|
||||||
diffuseTexCoord = tex;
|
diffuseTexCoord = tex;
|
||||||
diffuseTexCoord2 = tex2;
|
diffuseTexCoord2 = tex2;
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ vertexshaders
|
|||||||
void main( )
|
void main( )
|
||||||
{
|
{
|
||||||
gl_Position = WorldViewProj * pos;
|
gl_Position = WorldViewProj * pos;
|
||||||
diffuse = DiffuseColor * col;
|
diffuse = DiffuseColor * col;
|
||||||
specular = vec4(0, 0, 0, saturate(dot(pos, FogVector)));
|
specular = vec4(0, 0, 0, saturate(dot(pos, FogVector)));
|
||||||
diffuseTexCoord = tex;
|
diffuseTexCoord = tex;
|
||||||
diffuseTexCoord2 = tex2;
|
diffuseTexCoord2 = tex2;
|
||||||
@ -83,7 +83,7 @@ vertexshaders
|
|||||||
void main( )
|
void main( )
|
||||||
{
|
{
|
||||||
gl_Position = WorldViewProj * pos;
|
gl_Position = WorldViewProj * pos;
|
||||||
diffuse = DiffuseColor * col;
|
diffuse = DiffuseColor * col;
|
||||||
diffuseTexCoord = tex;
|
diffuseTexCoord = tex;
|
||||||
diffuseTexCoord2 = tex2;
|
diffuseTexCoord2 = tex2;
|
||||||
}
|
}
|
||||||
@ -107,11 +107,11 @@ fragmentshaders
|
|||||||
varying vec2 diffuseTexCoord2;
|
varying vec2 diffuseTexCoord2;
|
||||||
void main( )
|
void main( )
|
||||||
{
|
{
|
||||||
vec4 color = texture2D(Texture, diffuseTexCoord);
|
vec4 color = texture2D(Texture, diffuseTexCoord);
|
||||||
vec4 overlay = texture2D(Texture2, diffuseTexCoord2);
|
vec4 overlay = texture2D(Texture2, diffuseTexCoord2);
|
||||||
color.rgb *= 2;
|
color.rgb *= 2;
|
||||||
color *= overlay * diffuse;
|
color *= overlay * diffuse;
|
||||||
color.rgb = lerp(color.rgb, FogColor * color.a, specular.w);
|
color.rgb = lerp(color.rgb, FogColor * color.a, specular.w);
|
||||||
gl_FragColor = color;
|
gl_FragColor = color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -123,10 +123,10 @@ fragmentshaders
|
|||||||
varying vec2 diffuseTexCoord2;
|
varying vec2 diffuseTexCoord2;
|
||||||
void main( )
|
void main( )
|
||||||
{
|
{
|
||||||
vec4 color = texture2D(Texture, diffuseTexCoord);
|
vec4 color = texture2D(Texture, diffuseTexCoord);
|
||||||
vec4 overlay = texture2D(Texture2, diffuseTexCoord2);
|
vec4 overlay = texture2D(Texture2, diffuseTexCoord2);
|
||||||
color.rgb *= 2;
|
color.rgb *= 2;
|
||||||
color *= overlay * diffuse;
|
color *= overlay * diffuse;
|
||||||
gl_FragColor = color;
|
gl_FragColor = color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user