tModLoader v2024.10
A mod to make and play Terraria mods
LiquidRenderer Class Reference

Public Member Functions

unsafe void DrawNormalLiquids (SpriteBatch spriteBatch, Vector2 drawOffset, int waterStyle, float globalAlpha, bool isBackgroundDraw)
 
unsafe void DrawShimmer (SpriteBatch spriteBatch, Vector2 drawOffset, bool isBackgroundDraw)
 
Rectangle GetCachedDrawArea ()
 
int GetShimmerFrame (bool top, float worldPositionX, float worldPositionY)
 
float GetVisibleLiquid (int x, int y)
 
bool HasFullWater (int x, int y)
 
void PrepareDraw (Rectangle drawArea)
 
void SetWaveMaskData (ref Texture2D texture)
 
void Update (GameTime gameTime)
 

Static Public Member Functions

static Vector4 GetShimmerBaseColor (float worldPositionX, float worldPositionY)
 
static Color GetShimmerGlitterColor (bool top, float worldPositionX, float worldPositionY)
 
static float GetShimmerGlitterOpacity (bool top, float worldPositionX, float worldPositionY)
 
static float GetShimmerWave (ref float worldPositionX, ref float worldPositionY)
 
static void LoadContent ()
 
static void SetShimmerVertexColors (ref VertexColors colors, float opacity, int x, int y)
 
static VertexColors SetShimmerVertexColors_Sparkle (ref VertexColors colors, float opacity, int x, int y, bool top)
 

Public Attributes

Asset< Texture2D >[] _liquidTextures = new Asset<Texture2D>[15]
 

Static Public Attributes

static LiquidRenderer Instance
 
const float MIN_LIQUID_SIZE = 0.25f
 

Events

Action< Color[], Rectangle > WaveFilters