mirror of
https://github.com/tanema/light_world.lua.git
synced 2024-12-24 20:24:19 +00:00
13 lines
321 B
Lua
13 lines
321 B
Lua
return [[//
|
|
const float pixel_w = 2.0;
|
|
const float pixel_h = 2.0;
|
|
|
|
vec4 effect(vec4 vcolor, Image texture, vec2 uv, vec2 pixel_coords)
|
|
{
|
|
float dx = pixel_w*(1.0/love_ScreenSize.x);
|
|
float dy = pixel_h*(1.0/love_ScreenSize.y);
|
|
vec2 coord = vec2(dx*floor(uv.x/dx), dy*floor(uv.y/dy));
|
|
return Texel(texture, coord);
|
|
}
|
|
]]
|