Skip to content

Instantly share code, notes, and snippets.

View saint11's full-sized avatar
💭
Working on Road to Ghoulcrest & Earthblade

saint11

💭
Working on Road to Ghoulcrest & Earthblade
View GitHub Profile
@saint11
saint11 / Common.fxh
Created June 27, 2023 22:58
Masking and distortion shader for pixel art water reflection
//-----------------------------------------------------------------------------
// Defines (so this compiles for PS4 or XNA)
//-----------------------------------------------------------------------------
// PS4
#if __PSSL__
#define DECLARE_TEXTURE(name, index) \
Texture2D name : register(t##index); \
SamplerState name##Sampler : register(s##index)
-- BASIC EASING FUNCIONS CHEAT CHEET
-- (most of them are based on glide by Jacob Albano https://github.com/jacobalbano/glide)
function ease_linear(t)
return t
end
function ease_cube_in(t)
return t * t * t
end