Files
LuaCsForBarotraumaEP/Libraries/MonoGame.Framework/Src/Tools/2MGFX/ShaderData.cs
2019-06-25 16:00:44 +03:00

62 lines
1.3 KiB
C#

using Microsoft.Xna.Framework.Graphics;
namespace TwoMGFX
{
internal partial class ShaderData
{
public ShaderData(bool isVertexShader, int sharedIndex, byte[] bytecode)
{
IsVertexShader = isVertexShader;
SharedIndex = sharedIndex;
Bytecode = (byte[])bytecode.Clone();
}
public bool IsVertexShader { get; private set; }
public struct Sampler
{
public MojoShader.MOJOSHADER_samplerType type;
public int textureSlot;
public int samplerSlot;
public string samplerName;
public string parameterName;
public int parameter;
public SamplerState state;
}
public struct Attribute
{
public string name;
public VertexElementUsage usage;
public int index;
#pragma warning disable 649
public int location;
#pragma warning restore 649
}
/// <summary>
/// The index to the constant buffers which are
/// required by this shader at runtime.
/// </summary>
public int[] _cbuffers;
public Sampler[] _samplers;
public Attribute[] _attributes;
public byte[] ShaderCode { get; set; }
#region Non-Serialized Stuff
public byte[] Bytecode { get; private set; }
// The index of the shader in the shared list.
public int SharedIndex { get; private set; }
#endregion // Non-Serialized Stuff
}
}