tModLoader v2025.09
A mod to make and play Terraria mods
LiquidEdgeRenderer Class Reference

Responsible for special rendering of liquid edges/slopes for the rewritten liquid slope handling. More...

Static Public Member Functions

static void Clear ()
 
static unsafe void CollectEdgeData (LiquidRenderer.LiquidCache *pCache, Tile tileCache, int tileX, int tileY)
 
static void DrawTileMask (SpriteBatch spriteBatch, RenderTarget2D tileTarget, Vector2 tileTargetOffset)
 

Static Public Attributes

static bool Enabled = true
 Whether the special edge rendering logic is enabled.
Even if it's enabled, it will only apply if Active is true.
 
static readonly BlendState MaskingBlendState
 

Properties

static bool Active [get]
 Whether the new rendering is actually active for this frame.
 
static Texture2D DefaultLiquidMask [get]
 The default liquid mask tile for tiles in TileID.Sets.BlocksWaterDrawingBehindSelf.
 
static Effect MaskShader [get]
 Turns all pixels with alpha above zero white, and all others transparent.
 

Detailed Description

Responsible for special rendering of liquid edges/slopes for the rewritten liquid slope handling.

See the related pull request: https://github.com/tModLoader/tModLoader/pull/4714

Member Data Documentation

◆ MaskingBlendState

readonly BlendState LiquidEdgeRenderer.MaskingBlendState
static
Initial value:
= new BlendState() {
ColorSourceBlend = Blend.Zero,
AlphaSourceBlend = Blend.Zero,
ColorDestinationBlend = Blend.InverseSourceAlpha,
AlphaDestinationBlend = Blend.InverseSourceAlpha
}