diff options
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 2 | ||||
-rw-r--r-- | drivers/gles2/shaders/canvas.glsl | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index a3c0bd344c..9b26cbfc7c 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -10306,6 +10306,8 @@ void RasterizerGLES2::_update_framebuffer() { return; int scale = GLOBAL_DEF("rasterizer/framebuffer_shrink",1); + if (scale<1) + scale=1; int dwidth = OS::get_singleton()->get_video_mode().width/scale; int dheight = OS::get_singleton()->get_video_mode().height/scale; diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index 259e82d704..285abd30ff 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -196,7 +196,7 @@ void main() { #ifdef USE_DISTANCE_FIELD const float smoothing = 1.0/32.0; float distance = texture2D(texture, uv_interp).a; - color.a = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance); + color.a = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance) * color.a; #else color *= texture2D( texture, uv_interp ); |