-Fix freezes caused by etccomp2, closes #9183

-Normalmaps are now detected and imported as RGTC, both in S3TC and ETC2, this improves their quality.
This commit is contained in:
Juan Linietsky
2017-06-16 21:47:28 -03:00
parent 8a03a29233
commit b19225bfce
22 changed files with 180 additions and 57 deletions

View File

@ -427,10 +427,10 @@ void ColorPicker::_screen_input(const Ref<InputEvent> &ev) {
Viewport *r = get_tree()->get_root();
if (!r->get_visible_rect().has_point(Point2(mev->get_global_position().x, mev->get_global_position().y)))
return;
Ref<Image> img = r->get_screen_capture();
Ref<Image> img; //= r->get_screen_capture();
if (!img.is_null()) {
last_capture = img;
r->queue_screen_capture();
//r->queue_screen_capture();
}
if (last_capture.is_valid() && !last_capture->empty()) {
int pw = last_capture->get_format() == Image::FORMAT_RGBA8 ? 4 : 3;
@ -460,7 +460,7 @@ void ColorPicker::_screen_pick_pressed() {
}
screen->raise();
screen->show_modal();
r->queue_screen_capture();
// r->queue_screen_capture();
}
void ColorPicker::_bind_methods() {