tModLoader v2024.11
A mod to make and play Terraria mods
WaterShaderData Class Reference

Inherits ScreenShaderData.

Public Member Functions

 WaterShaderData (string passName)
 
override void Apply ()
 
void QueueRipple (Vector2 position, Color waveData, Vector2 size, RippleShape shape=RippleShape.Square, float rotation=0f)
 
void QueueRipple (Vector2 position, float strength, Vector2 size, RippleShape shape=RippleShape.Square, float rotation=0f)
 
void QueueRipple (Vector2 position, float strength=1f, RippleShape shape=RippleShape.Square, float rotation=0f)
 
override void Update (GameTime gameTime)
 
- Public Member Functions inherited from ScreenShaderData
 ScreenShaderData (Asset< Effect > shader, string passName)
 
 ScreenShaderData (Ref< Effect > shader, string passName)
 
 ScreenShaderData (string passName)
 
override void Apply ()
 
virtual ScreenShaderData GetSecondaryShader (Player player)
 
virtual void Update (GameTime gameTime)
 
ScreenShaderData UseColor (Color color)
 
ScreenShaderData UseColor (float r, float g, float b)
 
ScreenShaderData UseColor (Vector3 color)
 
ScreenShaderData UseDirection (Vector2 direction)
 
ScreenShaderData UseGlobalOpacity (float opacity)
 
ScreenShaderData UseImage (Asset< Texture2D > image, int index=0, SamplerState samplerState=null)
 
ScreenShaderData UseImage (string path, int index=0, SamplerState samplerState=null)
 
ScreenShaderData UseImage (Texture2D image, int index=0, SamplerState samplerState=null)
 
ScreenShaderData UseImageOffset (Vector2 offset)
 
ScreenShaderData UseImageScale (Vector2 scale, int index=0)
 
ScreenShaderData UseIntensity (float intensity)
 
ScreenShaderData UseOpacity (float opacity)
 
ScreenShaderData UseProgress (float progress)
 
ScreenShaderData UseSecondaryColor (Color color)
 
ScreenShaderData UseSecondaryColor (float r, float g, float b)
 
ScreenShaderData UseSecondaryColor (Vector3 color)
 
ScreenShaderData UseTargetPosition (Vector2 position)
 
- Public Member Functions inherited from ShaderData
 ShaderData (Asset< Effect > shader, string passName)
 
 ShaderData (Ref< Effect > shader, string passName)
 
virtual void Apply ()
 
void SwapProgram (string passName)
 

Public Attributes

bool _useProjectileWaves = true
 
bool _useViscosityFilter = true
 

Events

Action< TileBatchOnWaveDraw
 

Additional Inherited Members

- Properties inherited from ScreenShaderData
float CombinedOpacity [get]
 
float Intensity [get]
 
- Properties inherited from ShaderData
Effect Shader [get]
 

Member Function Documentation

◆ Apply()

override void WaterShaderData.Apply ( )
virtual

Reimplemented from ShaderData.

◆ Update()

override void WaterShaderData.Update ( GameTime  gameTime)
virtual

Reimplemented from ScreenShaderData.