wowowowowowowo so much stuff
This commit is contained in:
parent
fe21cb61e3
commit
2f40eaf000
249 changed files with 391 additions and 20 deletions
31
shaders.lua
Normal file
31
shaders.lua
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
wiggle = love.graphics.newShader[[
|
||||
|
||||
extern number seed;
|
||||
extern number amount;
|
||||
|
||||
|
||||
int grain = 10; //higher = less, lower = more
|
||||
|
||||
float rand(vec2 co){
|
||||
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
|
||||
}
|
||||
|
||||
vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords) {
|
||||
vec4 pixel_me = Texel(texture, texture_coords );
|
||||
|
||||
return Texel(texture, texture_coords + (rand(texture_coords * seed) - .5) * amount);
|
||||
/*
|
||||
int resolution = int(12 * 1 / zoom);
|
||||
|
||||
vec2 final_coords = floor((resolution * texture_coords) + 0.5) / resolution;
|
||||
|
||||
vec4 averaged_pixel = (Texel(texture, final_coords - (1 / resolution)) + Texel(texture, final_coords)) / 2 + (rand(final_coords * seed) / grain);
|
||||
|
||||
averaged_pixel.a = 1;
|
||||
|
||||
pixel_me = Texel(texture, final_coords);
|
||||
|
||||
return averaged_pixel;
|
||||
*/
|
||||
}
|
||||
]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue