Files
CalamityModPublic/Effects/SineWaveDistortionShader.fx
fryzahh 1910a4c918 Divine Meat sprites + misc
* Renamed DivineCornucopia to DivineMeat and added in its final sprites. Functionality remains the same.
* Added some minor visual additions to Divine Meat and Disgusting Meat when they are dropped on the ground in the world.
* Added some minor visual additions to Divine Swine.
* Divine Swine now increments its y-velocity while flying in random directions to prevent it from infinitely flying up and into space.
* Disgusting Meat can no longer be used while its animation is being played.
2026-05-12 12:41:59 -04:00

27 lines
686 B
HLSL

sampler baseTexture : register(s0);
float time;
float waveAmplitude;
float waveFrequency;
bool distortHorizontally;
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
{
float2 horizontalDistortion = sin(coords.x * waveFrequency + time) * waveAmplitude;
float2 verticalDistortion = sin(coords.y * waveFrequency + time) * waveAmplitude;
if (distortHorizontally)
coords.y += horizontalDistortion;
else
coords.x += verticalDistortion;
return tex2D(baseTexture, coords) * sampleColor;
}
technique Technique1
{
pass SinePass
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}