Class ConvexHullHatchProperties
- Namespace
- Gamelogic.Fx.CrossHatching.PostProcessing.Effects
- Assembly
- Gamelogic.Fx.CrossHatching.dll
Shader properties for the convex-hull cross-hatching post-processing effect.
[Serializable]
public sealed class ConvexHullHatchProperties : ShaderProperties
- Inheritance
-
ConvexHullHatchProperties
- Inherited Members
Properties
BackgroundColor
Gets or sets the background reference color used as the starting point for convex-hull color projection.
public Color BackgroundColor { get; set; }
Property Value
BaseOrientation
Gets or sets the base rotation angle, in degrees, applied before per-layer orientation is added.
public float BaseOrientation { get; set; }
Property Value
HatchStrength
Gets or sets how strongly the hatch pattern influences the convex-hull projection. Higher values increase the impact of the hatching texture on color mapping.
public float HatchStrength { get; set; }
Property Value
HatchTexture
Gets or sets the hatch texture used to modulate convex-hull projection. Typically, a tileable line or stipple pattern.
public Texture HatchTexture { get; set; }
Property Value
HatchTextureTilingOffset
Gets or sets the tiling offset applied to the hatch texture.
public Vector2 HatchTextureTilingOffset { get; set; }
Property Value
HatchTextureTilingScale
Gets or sets the tiling scale applied to the hatch texture.
public Vector2 HatchTextureTilingScale { get; set; }
Property Value
LayerCount
Gets or sets the number of hatching layers used to modulate the convex-hull projection. Higher values increase texture density and color modulation in darker regions.
public int LayerCount { get; set; }
Property Value
LayerOffset
Gets or sets the per-layer UV offset applied to the hatch texture. The offset is multiplied by the current layer index.
public Vector2 LayerOffset { get; set; }
Property Value
OrientationFromTexture
Gets or sets whether hatch orientation should be sampled from an orientation texture instead of being derived solely from the orientation scheme.
public bool OrientationFromTexture { get; set; }
Property Value
OrientationScheme
Gets or sets the orientation scheme used to rotate hatching layers. This controls how hatch angles vary across successive layers.
public OrientationScheme OrientationScheme { get; set; }
Property Value
OrientationTexture
Gets or sets the texture used to sample per-region hatch orientation when OrientationFromTexture is enabled.
public Texture OrientationTexture { get; set; }
Property Value
OrientationTextureTilingOffset
Gets or sets the tiling offset applied to the orientation texture.
public Vector2 OrientationTextureTilingOffset { get; set; }
Property Value
OrientationTextureTilingScale
Gets or sets the tiling scale applied to the orientation texture.
public Vector2 OrientationTextureTilingScale { get; set; }
Property Value
PrimaryColors
Gets or sets the collection of primary colors that define the convex hull. These colors act as anchors toward which pixel colors are iteratively projected.
public IEnumerable<Color> PrimaryColors { get; set; }
Property Value
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).