Table of Contents

Class PixelateProperties

Namespace
Gamelogic.Fx.PostProcessing.Effects
Assembly
Gamelogic.Fx.dll

Shader properties for the pixelate post-processing effect.

[Serializable]
public sealed class PixelateProperties : ShaderProperties
Inheritance
PixelateProperties
Inherited Members

Properties

GridAngle

Gets or sets the rotation of the pixel grid in degrees.

public float GridAngle { get; set; }

Property Value

float

GridType

Gets or sets the cell geometry used for the pixel grid.

public GridType GridType { get; set; }

Property Value

GridType

PixelOffset

Gets or sets the offset of the pixel grid in screen pixels. Only used in rect mode.

public Vector2 PixelOffset { get; set; }

Property Value

Vector2

PixelSize

Gets or sets the width and height of each rendered pixel block in screen pixels.

public Vector2 PixelSize { get; set; }

Property Value

Vector2

ShaderName

Gets the name of the shader used by this property set.

public override string ShaderName { get; }

Property Value

string

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

SetMaterialProperties(Material)

Applies all shader-related properties to the given material.

public override void SetMaterialProperties(Material effectMaterial)

Parameters

effectMaterial Material

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().