- [FIX] draw.text() també soporta que li pases un numero pa escriure-lo
This commit is contained in:
@@ -20,7 +20,11 @@ void main()
|
|||||||
float x = sign(pix_coord.x)*floor(abs(pix_coord.x)+0.5);
|
float x = sign(pix_coord.x)*floor(abs(pix_coord.x)+0.5);
|
||||||
float column = mod(x,4.0);
|
float column = mod(x,4.0);
|
||||||
vec4 color = texture2D(Texture, tex_coord);
|
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;
|
vec4 newcolor;
|
||||||
if (column == 0.0) {
|
if (column == 0.0) {
|
||||||
newcolor = color * vec4(1.0, 0.4, 0.6, 1.0);
|
newcolor = color * vec4(1.0, 0.4, 0.6, 1.0);
|
||||||
|
|||||||
@@ -268,6 +268,13 @@ function draw.surfrot(sx, sy, sw, sh, x, y, a) end
|
|||||||
---Draw text to (x,y) using the specified color
|
---Draw text to (x,y) using the specified color
|
||||||
function draw.text(text, x, y, color) end
|
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
|
---@class shader
|
||||||
shader = {}
|
shader = {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user