濒死警告不再遮挡屏幕上下边缘
This commit is contained in:
@@ -369,7 +369,6 @@ function love.resize(w,h)
|
|||||||
WIDGET.resize(w,h)
|
WIDGET.resize(w,h)
|
||||||
|
|
||||||
SHADER.warning:send("w",w*SCR.dpi)
|
SHADER.warning:send("w",w*SCR.dpi)
|
||||||
SHADER.warning:send("h",h*SCR.dpi)
|
|
||||||
end
|
end
|
||||||
function love.focus(f)
|
function love.focus(f)
|
||||||
if f then
|
if f then
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
extern float w,h;
|
extern float w;
|
||||||
extern float level;
|
extern float level;
|
||||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||||
float dx=abs(scr_coords.x/w-0.5);
|
float dx=abs(scr_coords.x/w-0.5);
|
||||||
float dy=abs(scr_coords.y/h-0.5);
|
float a=(dx*2.6-.626)*level;
|
||||||
float a=(max(dx*2.6,dy*1.8)-.626)*level;
|
|
||||||
return vec4(1.,0.,0.,a);
|
return vec4(1.,0.,0.,a);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user