Navigation Menu

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;
render_mode blend_mix;
uniform bool active = true;
uniform int ngg : hint_range(1, 8) = 6;
float T(float z) {
return z >= 0.5 ? 2.-2.*z : 2.*z;
}
@jimmyjonezz
jimmyjonezz / chromatic_aberration.shader
Created November 23, 2020 16:47
chromatic_aberration.shader + shake
// chromatic_aberration.shader
// based on code from https://gist.github.com/uheartbeast/312a7ea761b8712c448b31c30c0d8f1f
shader_type canvas_item;
uniform bool apply = true;
uniform float amount = 1.0;
uniform float strength : hint_range(0.0, 2.0) = 1.0;
uniform sampler2D offset_texture : hint_white;
shader_type canvas_item;
uniform float amount : hint_range(0,0.5);
vec4 sample_glow_pixel(sampler2D tex, vec2 uv) {
float hdr_threshold = amount;
return max(textureLod(tex, uv, 2.0) - hdr_threshold, vec4(0.0));
}
void fragment() {
@jimmyjonezz
jimmyjonezz / lowres.shader
Created June 29, 2020 16:04
Lowres screen shader for #godotengine
shader_type canvas_item;
uniform float size_x = 0.002;
uniform float size_y = 0.0035;
void fragment() {
vec2 uv = SCREEN_UV;
@jimmyjonezz
jimmyjonezz / blink.shader
Created May 11, 2020 10:09
image -> gradient color.
shader_type canvas_item;
uniform float brightness = 0.5;
void fragment(){
vec4 pixel_color = texture(SCREEN_TEXTURE, SCREEN_UV, 1);
COLOR.rgb = vec3(dot(pixel_color.rgb, vec3(brightness, brightness, brightness)));
}
shader_type canvas_item;
uniform float PI = 3.1415926535;
uniform float aperture = 178.0;
void fragment(){
float apertureHalf = 0.5 * aperture * (PI / 180.0);
float maxFactor = sin(apertureHalf);
vec2 uv;
shader_type canvas_item;
uniform vec3 color = vec3(0.35, 0.48, 0.95);
uniform int OCTAVES = 4;
float randi(vec2 coord){
return fract(sin(dot(coord, vec2(56,78)) * 1000.0) * 1000.0); }
float noise(vec2 coord){
vec2 i = floor(coord);
shader_type canvas_item;
uniform float brightness=0.8;
uniform float contrast=1.5;
uniform float saturation=1.8;
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
shader_type canvas_item;
uniform float AMPLITUDE = .1;
uniform float SPEED = 5.0;
vec4 rgbShift( in vec2 p , in vec4 shift, in sampler2D tex) {
vec2 rs = vec2(shift.x,-shift.y);
vec2 gs = vec2(shift.y,-shift.z);
vec2 bs = vec2(shift.z,-shift.x);