diff --git a/data/lynx.glsl b/data/lynx.glsl index 693ac4b..6b6787f 100644 --- a/data/lynx.glsl +++ b/data/lynx.glsl @@ -20,7 +20,11 @@ void main() float x = sign(pix_coord.x)*floor(abs(pix_coord.x)+0.5); float column = mod(x,4.0); vec4 color = texture2D(Texture, tex_coord); - color = color + vec4(0.5, 0.5, 0.5, 0.0) * (1.0-tex_coord.t); + float xfade = abs((tex_coord.s * 2.0) - 1.0); + xfade = xfade * xfade * xfade * xfade * xfade; + float yfade = abs((tex_coord.t * 2.0) - 1.0); + yfade = yfade * yfade * yfade * yfade * yfade; + color = color + vec4(0.7, 0.7, 0.7, 0.0) * (1.0-tex_coord.t) * (1.0-xfade) * (1.0-yfade); vec4 newcolor; if (column == 0.0) { newcolor = color * vec4(1.0, 0.4, 0.6, 1.0); @@ -34,4 +38,4 @@ void main() gl_FragColor = newcolor; } -#endif \ No newline at end of file +#endif diff --git a/vscode/library.lua b/vscode/library.lua index 86b3f2d..ed94a02 100644 --- a/vscode/library.lua +++ b/vscode/library.lua @@ -268,6 +268,13 @@ function draw.surfrot(sx, sy, sw, sh, x, y, a) end ---Draw text to (x,y) using the specified color function draw.text(text, x, y, color) end +---@param text number +---@param x number +---@param y number +---@param color number +---Draw text to (x,y) using the specified color +function draw.text(text, x, y, color) end + ---@class shader shader = {}