ParticleSpriteRendererclass

Renders particles as 2D sprites - can be static or animated

object→ParticleRenderer→ParticleSpriteRenderer
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.ParticleSpriteRenderer : Sandbox.ParticleRenderer

Constructors1

Showing 1 constructors

Methods2

Showing 2 methods

Properties32

Showing 32 properties

public virtual sealed bool Sandbox.ParticleSpriteRenderer.Additive { get; set; }PUBLICVIRTUALGETSET

Whether or not the sprite should be rendered additively.

Returns:bool—

public virtual sealed float Sandbox.ParticleSpriteRenderer.BlurAmount { get; set; }PUBLICVIRTUALGETSET

Amount of blur applied to the sprite during motion blur.

Returns:float—

public virtual sealed float Sandbox.ParticleSpriteRenderer.BlurOpacity { get; set; }PUBLICVIRTUALGETSET

Opacity of the blur effect applied to the sprite.

Returns:float—

public virtual sealed float Sandbox.ParticleSpriteRenderer.BlurSpacing { get; set; }PUBLICVIRTUALGETSET

Spacing between blur samples in the motion blur effect.

Returns:float—

public virtual sealed float Sandbox.ParticleSpriteRenderer.CameraFadeFar { get; set; }PUBLICVIRTUALGETSET

Sprites further from the camera than this are fully opaque. Between this and `Sandbox.ParticleSpriteRenderer.CameraFadeNear` they fade out. Leave at zero to disable the fade.

Returns:float—

public virtual sealed float Sandbox.ParticleSpriteRenderer.CameraFadeNear { get; set; }PUBLICVIRTUALGETSET

Sprites closer to the camera than this are completely invisible.

Returns:float—

public virtual int Sandbox.ParticleSpriteRenderer.ComponentVersion { get; set; }PUBLICVIRTUALGETSET

Returns:int—

public Sandbox.Sprite.Animation Sandbox.ParticleSpriteRenderer.CurrentAnimation { get; set; }PUBLICGETSET

The animation that is currently being played. Returns null if no sprite is set or the sprite has no animations.

Returns:Animation—

public virtual sealed float Sandbox.ParticleSpriteRenderer.DepthFeather { get; set; }PUBLICVIRTUALGETSET

Amount of feathering applied to the depth, softening its intersection with geometry.

Returns:float—

public virtual sealed bool Sandbox.ParticleSpriteRenderer.FaceVelocity { get; set; }PUBLICVIRTUALGETSET

Aligns the sprite to face its velocity direction.

Returns:bool—

public virtual sealed float Sandbox.ParticleSpriteRenderer.FogStrength { get; set; }PUBLICVIRTUALGETSET

The strength of the fog effect applied to the sprite. This determines how much the sprite blends with any fog in the scene.

Returns:float—

public bool Sandbox.ParticleSpriteRenderer.IsAnimated { get; set; }PUBLICGETSET

Whether or not the sprite is animated. This is true if the sprite has more than one animation or if the current animation has more than one frame.

Returns:bool—

public virtual sealed bool Sandbox.ParticleSpriteRenderer.IsSorted { get; set; }PUBLICVIRTUALGETSET

Interface property to determine if particles should be sorted

Returns:bool—

public virtual sealed bool Sandbox.ParticleSpriteRenderer.LeadingTrail { get; set; }PUBLICVIRTUALGETSET

Determines whether the motion blur effect includes a leading trail.

Returns:bool—

public virtual sealed bool Sandbox.ParticleSpriteRenderer.Lighting { get; set; }PUBLICVIRTUALGETSET

Whether or not the sprite should be lit by the scene lighting.

Returns:bool—

public Sandbox.Texture Sandbox.ParticleSpriteRenderer.NormalTexture { get; set; }PUBLICGETSET

Tangent-space normal map sampled in linear space. Use the same UV layout as the sprite texture: particle sheet sequences, frame blending and rotation are shared with the alpha mask. For sprites that change texture between frames, this map is shared by every frame.

Returns:Texture—

public virtual sealed bool Sandbox.ParticleSpriteRenderer.Opaque { get; set; }PUBLICVIRTUALGETSET

Indicates whether the sprite is opaque, optimizing rendering by skipping sorting.

Returns:bool—

public virtual sealed Vector2 Sandbox.ParticleSpriteRenderer.Pivot { get; set; }PUBLICVIRTUALGETSET

The pivot point of the sprite, used for rotation and scaling. This is in normalized coordinates (0 to 1).

Returns:Vector2—

public bool Sandbox.ParticleSpriteRenderer.Refraction { get; set; }PUBLICGETSET

Draw the sprite artwork over a refracted background in one pass. Alpha controls the artwork only. Requires a normal texture and translucent, non-additive rendering. The captured scene is already lit and fogged.

Returns:bool—

public virtual sealed Sandbox.ParticleFloat Sandbox.ParticleSpriteRenderer.RefractionStrength { get; set; }PUBLICVIRTUALGETSET

Maximum refraction offset in render pixels before the normal is applied. Alpha, depth feathering and camera fading affect artwork opacity only, never the refraction. Supports constants, random ranges and lifetime curves, like particle alpha. Zero leaves the captured background undistorted. Refraction must be disabled to return to ordinary sprite rendering.

Returns:ParticleFloat—

public virtual sealed Sandbox.Texture Sandbox.ParticleSpriteRenderer.RenderTexture { get; set; }PUBLICVIRTUALGETSET

Provides texture for rendering - implementation for IBatchedParticleSpriteRenderer

Returns:Texture—

public virtual sealed float Sandbox.ParticleSpriteRenderer.RotationOffset { get; set; }PUBLICVIRTUALGETSET

Offset applied to the rotation when facing velocity.

Returns:float—

public virtual sealed float Sandbox.ParticleSpriteRenderer.Scale { get; set; }PUBLICVIRTUALGETSET

The scale of the sprite when rendered.

Returns:float—

public virtual sealed bool Sandbox.ParticleSpriteRenderer.Shadows { get; set; }PUBLICVIRTUALGETSET

Whether or not the sprite should cast shadows in the scene.

Returns:bool—

public string Sandbox.ParticleSpriteRenderer.StartingAnimationName { get; set; }PUBLICGETSET

The animation that this sprite should start playing when the scene starts.

Returns:string—

public virtual sealed Sandbox.Rendering.FilterMode Sandbox.ParticleSpriteRenderer.TextureFilter { get; set; }PUBLICVIRTUALGETSET

The texture filtering mode used when rendering the sprite. For pixelated sprites use `Sandbox.Rendering.FilterMode.Point`.

Returns:FilterMode—

On this page

Constructorspublic ParticleSpriteRenderer()Methodspublic System.Void SetAnimation(System.Int32 index)public System.Void SetAnimation(System.String name)Propertiespublic virtual sealed System.Boolean Sandbox.ParticleSpriteRenderer.Additive { get; set; }public virtual sealed Sandbox.ParticleSpriteRenderer.BillboardAlignment Sandbox.ParticleSpriteRenderer.Alignment { get; set; }public virtual sealed System.Single Sandbox.ParticleSpriteRenderer.BlurAmount { get; set; }public virtual sealed System.Single Sandbox.ParticleSpriteRenderer.BlurOpacity { get; set; }public virtual sealed System.Single Sandbox.ParticleSpriteRenderer.BlurSpacing { get; set; }public virtual sealed System.Single Sandbox.ParticleSpriteRenderer.CameraFadeFar { get; set; }public virtual sealed System.Single Sandbox.ParticleSpriteRenderer.CameraFadeNear { get; set; }public virtual System.Int32 Sandbox.ParticleSpriteRenderer.ComponentVersion { get; set; }public Sandbox.Sprite.Animation Sandbox.ParticleSpriteRenderer.CurrentAnimation { get; set; }public virtual sealed System.Single Sandbox.ParticleSpriteRenderer.DepthFeather { get; set; }public virtual sealed System.Boolean Sandbox.ParticleSpriteRenderer.FaceVelocity { get; set; }public virtual sealed System.Single Sandbox.ParticleSpriteRenderer.FogStrength { get; set; }public System.Boolean Sandbox.ParticleSpriteRenderer.IsAnimated { get; set; }public virtual sealed System.Boolean Sandbox.ParticleSpriteRenderer.IsSorted { get; set; }public virtual sealed System.Boolean Sandbox.ParticleSpriteRenderer.LeadingTrail { get; set; }public virtual sealed System.Boolean Sandbox.ParticleSpriteRenderer.Lighting { get; set; }public virtual sealed System.Boolean Sandbox.ParticleSpriteRenderer.MotionBlur { get; set; }public Sandbox.Texture Sandbox.ParticleSpriteRenderer.NormalTexture { get; set; }public virtual sealed System.Boolean Sandbox.ParticleSpriteRenderer.Opaque { get; set; }public virtual sealed Vector2 Sandbox.ParticleSpriteRenderer.Pivot { get; set; }public System.Single Sandbox.ParticleSpriteRenderer.PlaybackSpeed { get; set; }public System.Boolean Sandbox.ParticleSpriteRenderer.Refraction { get; set; }public virtual sealed Sandbox.ParticleFloat Sandbox.ParticleSpriteRenderer.RefractionStrength { get; set; }public virtual sealed Sandbox.Texture Sandbox.ParticleSpriteRenderer.RenderTexture { get; set; }public virtual sealed System.Single Sandbox.ParticleSpriteRenderer.RotationOffset { get; set; }public virtual sealed System.Single Sandbox.ParticleSpriteRenderer.Scale { get; set; }public virtual sealed System.Boolean Sandbox.ParticleSpriteRenderer.Shadows { get; set; }public Sandbox.ParticleSpriteRenderer.ParticleSortMode Sandbox.ParticleSpriteRenderer.SortMode { get; set; }public Sandbox.Sprite Sandbox.ParticleSpriteRenderer.Sprite { get; set; }public System.String Sandbox.ParticleSpriteRenderer.StartingAnimationName { get; set; }public Sandbox.Texture Sandbox.ParticleSpriteRenderer.Texture { get; set; }public virtual sealed Sandbox.Rendering.FilterMode Sandbox.ParticleSpriteRenderer.TextureFilter { get; set; }Metadata