Class MixboxConvexHullMapProperties
- Namespace
- Gamelogic.Fx.PostProcessing.Effects
- Assembly
- Gamelogic.Fx.dll
Shader properties for the Mixbox convex-hull map post-processing effect.
[Serializable]
public sealed class MixboxConvexHullMapProperties : ShaderProperties
- Inheritance
-
MixboxConvexHullMapProperties
- Inherited Members
Properties
BackgroundColor
Gets or sets the background reference color used as the starting point for Mixbox convex-hull projection.
public Color BackgroundColor { get; set; }
Property Value
LevelCount
Gets or sets the number of refinement iterations used for Mixbox convex-hull projection. Higher values progressively move colors closer to the convex hull defined by the primary colors.
public int LevelCount { get; set; }
Property Value
PrimaryColors
Gets or sets the collection of primary colors that define the convex hull. Pixel colors are iteratively blended toward these palette anchors using Mixbox.
public IEnumerable<Color> PrimaryColors { get; set; }
Property Value
Requirements
Names of optional external packages this property set's shader depends on for one of its
shader_feature keywords (for example "Mixbox").
public override IEnumerable<string> Requirements { get; }
Property Value
Remarks
Used by the editor-time shader variant collector (see
EffectShaderVariantCollectionUtils) to know which package-presence keywords
(such as GAMELOGIC_HAS_MIXBOX) to record for this shader, alongside the keywords
from GetActiveShaderFeatureKeywords(). Unlike RequiresDepthTexture
and RequiresNormalsTexture - a small, fixed set read by one runtime
consumer - this covers an open-ended, growing set of optional third-party dependencies,
so new ones are added by overriding this in the relevant subclass rather than by widening
this base class further.
Empty by default. Override to return the relevant requirement name(s) if this shader
declares a shader_feature keyword gated on a package that might not be installed.
ShaderName
Gets the name of the shader used by this property set.
public override string ShaderName { get; }
Property Value
Remarks
This name is passed to the internal shader lookup system when the properties are enabled. It should match the full shader path as defined in the shader file.
Methods
OnEnable()
Called when the owning component or asset is enabled.
public override void OnEnable()
Remarks
The default implementation resolves the shader using ShaderName.
Subclasses overriding this method should normally call base.OnEnable().
OnValidate()
Called when serialized values are changed in the inspector.
public override void OnValidate()
Remarks
Override this method to clamp values, enforce invariants, or perform lightweight validation in response to inspector edits.
SetMaterialProperties(Material)
Applies all shader-related properties to the given material.
public override void SetMaterialProperties(Material effectMaterial)
Parameters
effectMaterialMaterial
Remarks
Subclasses should override this method and set all relevant shader uniforms (for example, floats, vectors, colors, textures, and keywords).
Do not call IncMaterialVersion() here. By the time this method is called the material has already been fetched, so any increment would take effect one frame late. Staleness checks belong in CheckMaterialVersion().