32 : base(shader, passName)
38 base.Shader.Parameters[
"uColor"].SetValue(
_uColor);
39 base.Shader.Parameters[
"uSaturation"].SetValue(
_uSaturation);
42 base.Shader.Parameters[
"uOpacity"].SetValue(
_uOpacity);
44 if (drawData.HasValue)
48 if (drawData.Value.sourceRect.HasValue)
50 value2 =
new Vector4(
value.sourceRect.Value.X,
value.sourceRect.Value.Y,
value.sourceRect.Value.Width,
value.sourceRect.Value.Height);
52 base.Shader.Parameters[
"uSourceRect"].SetValue(value2);
54 base.Shader.Parameters[
"uImageSize0"].SetValue(
new Vector2(
value.texture.Width,
value.texture.Height));
58 base.Shader.Parameters[
"uSourceRect"].SetValue(
new Vector4(0f, 0f, 4f, 4f));
static readonly SamplerState LinearWrap
static double Ceiling(double a)
static double Log(double d)
static double Floor(double d)
MiscShaderData UseSecondaryColor(Vector3 color)
Asset< Texture2D > _uImage0
bool _useProjectionMatrix
static bool IsPowerOfTwo(int n)
Asset< Texture2D > _uImage1
Asset< Texture2D > _uImage2
MiscShaderData UseImage1(string path)
MiscShaderData UseColor(Vector3 color)
MiscShaderData UseImage2(string path)
Vector4 _shaderSpecificData
MiscShaderData UseProjectionMatrix(bool doUse)
MiscShaderData UseSecondaryColor(float r, float g, float b)
MiscShaderData UseSecondaryColor(Color color)
virtual void Apply(DrawData? drawData=null)
virtual MiscShaderData GetSecondaryShader(Entity entity)
MiscShaderData UseColor(Color color)
MiscShaderData UseSaturation(float saturation)
MiscShaderData UseShaderSpecificData(Vector4 specificData)
MiscShaderData UseColor(float r, float g, float b)
MiscShaderData UseSamplerState(SamplerState state)
SamplerState _customSamplerState
MiscShaderData UseOpacity(float alpha)
MiscShaderData(Ref< Effect > shader, string passName)
MiscShaderData UseImage0(string path)
static Vector2 screenPosition
static IAssetRepository Assets
static float GlobalTimeWrappedHourly
static GraphicsDeviceManager graphics