Skip to content

Instantly share code, notes, and snippets.

View jimmyjonezz's full-sized avatar
🎯
Focusing...

Jimmy jimmyjonezz

🎯
Focusing...
View GitHub Profile
shader_type canvas_item;
uniform float percent : hint_range(0, 1);
void fragment(){
vec2 relative_uv = UV.yx - vec2(0.5);
float dist = abs(percent - distance(UV, vec2(0.5))) * 7.0;
float wave = pow(cos(dist)*sin(dist), 5.0);
vec2 displacement = (1.0/(percent+0.01)) * relative_uv * clamp(wave, 0.0, 1.0);
@jimmyjonezz
jimmyjonezz / shader
Created August 17, 2019 18:18
red + nois shader
shader_type canvas_item;
float rng2(vec2 seed, float time)
{
return fract(sin(dot(seed * floor(time* 12.0), vec2(127.1,311.7))) * 48654.5453123);
}
float rng(float seed, float time)
{
return rng2(vec2(seed, 1.0), time);
shader_type canvas_item;
varying float VAR1;
void vertex()
{
VAR1 = VERTEX.y;
}
void light()
{
if( ( LIGHT_VEC.y - VAR1 ) <= 0.0 )
{
shader_type canvas_item;
void fragment() {
vec3 col = -8.0 * texture(SCREEN_TEXTURE, SCREEN_UV).xyz;
col += texture(SCREEN_TEXTURE, SCREEN_UV + vec2(0.0, SCREEN_PIXEL_SIZE.y)).xyz;
col += texture(SCREEN_TEXTURE, SCREEN_UV + vec2(0.0, -SCREEN_PIXEL_SIZE.y)).xyz;
col += texture(SCREEN_TEXTURE, SCREEN_UV + vec2(SCREEN_PIXEL_SIZE.x, 0.0)).xyz;
col += texture(SCREEN_TEXTURE, SCREEN_UV + vec2(-SCREEN_PIXEL_SIZE.x, 0.0)).xyz;
col += texture(SCREEN_TEXTURE, SCREEN_UV + SCREEN_PIXEL_SIZE.xy).xyz;
col += texture(SCREEN_TEXTURE, SCREEN_UV - SCREEN_PIXEL_SIZE.xy).xyz;
shader_type canvas_item;
render_mode unshaded;
uniform bool Smooth = true;
uniform float width : hint_range(0.0, 16) = 1.0;
uniform vec4 outline_color : hint_color = vec4(0.0, 0.0, 0.0, 1.0);
uniform int pixel_size : hint_range(1, 10) = 4;
void fragment()
{
shader_type canvas_item;
uniform sampler2D palette_tex; //Palette to reference, this should be a 1-pixel tall texture containing your palette info
uniform vec4 outline_col : hint_color; //Outline color
void fragment() {
//Get red value and sample palette based on it
float pal_sample = texture(TEXTURE,UV).r;
vec4 col = texture(palette_tex,vec2(pal_sample,0));
shader_type canvas_item;
uniform float _PI = 3.1415926535897932384626433832795;
uniform float xx = 4.0;
uniform float yy = 2.0;
vec2 getPixelShift(vec2 center,vec2 pixelpos,float startradius,float size,float shockfactor, vec2 iResolution) {
float m_distance = distance(center,pixelpos);
if( m_distance > startradius && m_distance < startradius+size ) {
float sin_dist = sin((m_distance -startradius)/size* _PI )*shockfactor;
return ( pixelpos - normalize(pixelpos-center)*sin_dist )/ iResolution.xy;
shader_type canvas_item;
render_mode unshaded;
uniform vec4 color : hint_color;
uniform int blurSize : hint_range(0,30);
void fragment()
{
mat3 transform = mat3(vec3(3,-0.4,-.35),vec3(.2,3,-.3),vec3(.2,1.5,1));
vec3 coords = vec3(SCREEN_UV,1.0)*transform;
@jimmyjonezz
jimmyjonezz / hue.shader
Created January 3, 2020 20:52
switch color palette
shader_type canvas_item;
uniform float precision;
uniform float hue;
const mat3 rgb2yiq = mat3(vec3(0.299, 0.587, 0.114), vec3(0.595716, -0.274453, -0.321263), vec3(0.211456, -0.522591, 0.311135));
const mat3 yiq2rgb = mat3(vec3(1.0, 0.9563, 0.6210), vec3(1.0, -0.2721, -0.6474), vec3(1.0, -1.1070, 1.7046));
void fragment() {
vec3 yColor = rgb2yiq * texture(SCREEN_TEXTURE, SCREEN_UV).rgb;