2using System.Reflection;
42 set =>
m_time.SetValue(value);
45 public UnlitShader(
string vsc,
string psc,
bool useVertexColor,
bool useTexture,
bool useAdditiveColor,
bool useAlphaThreshold) : base(
61 public UnlitShader(
bool useVertexColor,
bool useTexture,
bool useAdditiveColor,
bool useAlphaThreshold) : base(
80 Stream stream = typeof(
Shader).GetTypeInfo().Assembly.GetManifestResourceStream(
"Engine.Resources.Unlit.vsh");
82 ArgumentNullException.ThrowIfNull(stream);
83 return new StreamReader(stream).ReadToEnd();
90 Stream stream = typeof(
Shader).GetTypeInfo().Assembly.GetManifestResourceStream(
"Engine.Resources.Unlit.psh");
92 ArgumentNullException.ThrowIfNull(stream);
93 return new StreamReader(stream).ReadToEnd();
97 Transforms.UpdateMatrices(1,
false,
false,
true);
102 List<ShaderMacro> list = [];
103 if (useVertexColor) {
109 if (useAdditiveColor) {
112 if (useAlphaThreshold) {
115 return list.ToArray();
virtual ShaderParameter GetParameter(string name, bool allowNull=false)
ShaderParameter m_additiveColorParameter
ShaderParameter m_worldViewProjectionMatrixParameter
static string GetUnlitPshString()
SamplerState SamplerState
static ShaderMacro[] PrepareShaderMacros(bool useVertexColor, bool useTexture, bool useAdditiveColor, bool useAlphaThreshold)
UnlitShader(bool useVertexColor, bool useTexture, bool useAdditiveColor, bool useAlphaThreshold)
override void PrepareForDrawingOverride()
ShaderParameter m_colorParameter
static string GetUnlitVshString()
ShaderParameter m_samplerStateParameter
UnlitShader(string vsc, string psc, bool useVertexColor, bool useTexture, bool useAdditiveColor, bool useAlphaThreshold)
ShaderParameter m_alphaThresholdParameter
ShaderParameter m_textureParameter
static Stream OpenFile(string path, OpenFileMode openFileMode)
static readonly Vector4 One